80 |
* @param idx The index of the instrument to be returned. |
* @param idx The index of the instrument to be returned. |
81 |
* @return The instrument at the specified position. |
* @return The instrument at the specified position. |
82 |
*/ |
*/ |
83 |
public Instrument getInstrument(int idx); |
public OrchestraInstrument getInstrument(int idx); |
84 |
|
|
85 |
/** |
/** |
86 |
* Adds the specified instrument to this orchestra. |
* Adds the specified instrument to this orchestra. |
87 |
* @param instr The instrument to be added. |
* @param instr The instrument to be added. |
88 |
*/ |
*/ |
89 |
public void addInstrument(Instrument instr); |
public void addInstrument(OrchestraInstrument instr); |
90 |
|
|
91 |
/** |
/** |
92 |
* Inserts the specified instrument at the specified position. |
* Inserts the specified instrument at the specified position. |
95 |
* @throws IllegalArgumentException If <code>instr</code> is <code>null</code>. |
* @throws IllegalArgumentException If <code>instr</code> is <code>null</code>. |
96 |
* @throws ArrayIndexOutOfBoundsException If the specified index is invalid. |
* @throws ArrayIndexOutOfBoundsException If the specified index is invalid. |
97 |
*/ |
*/ |
98 |
public void insertInstrument(Instrument instr, int idx); |
public void insertInstrument(OrchestraInstrument instr, int idx); |
99 |
|
|
100 |
/** |
/** |
101 |
* Removes the specified instrument from this orchestra. |
* Removes the specified instrument from this orchestra. |
109 |
* @return <code>true</code> if the specified instrument was in this orchestra, |
* @return <code>true</code> if the specified instrument was in this orchestra, |
110 |
* <code>false</code> otherwise. |
* <code>false</code> otherwise. |
111 |
*/ |
*/ |
112 |
public boolean removeInstrument(Instrument instr); |
public boolean removeInstrument(OrchestraInstrument instr); |
113 |
|
|
114 |
/** |
/** |
115 |
* Gets the position of the specified instrument in this orchestra. |
* Gets the position of the specified instrument in this orchestra. |
118 |
* and -1 if <code>instr</code> is <code>null</code> or |
* and -1 if <code>instr</code> is <code>null</code> or |
119 |
* the orchestra does not contain the specified instrument. |
* the orchestra does not contain the specified instrument. |
120 |
*/ |
*/ |
121 |
public int getInstrumentIndex(Instrument instr); |
public int getInstrumentIndex(OrchestraInstrument instr); |
122 |
|
|
123 |
/** |
/** |
124 |
* Moves the specified instrument one the top of the instrument list. |
* Moves the specified instrument one the top of the instrument list. |
127 |
* or if the instrument is already on the top. |
* or if the instrument is already on the top. |
128 |
* @param instr The instrument to move on top. |
* @param instr The instrument to move on top. |
129 |
*/ |
*/ |
130 |
public void moveInstrumentOnTop(Instrument instr); |
public void moveInstrumentOnTop(OrchestraInstrument instr); |
131 |
|
|
132 |
/** |
/** |
133 |
* Moves the specified instrument one position up in the instrument list. |
* Moves the specified instrument one position up in the instrument list. |
136 |
* or if the instrument is already on the top. |
* or if the instrument is already on the top. |
137 |
* @param instr The instrument to move up. |
* @param instr The instrument to move up. |
138 |
*/ |
*/ |
139 |
public void moveInstrumentUp(Instrument instr); |
public void moveInstrumentUp(OrchestraInstrument instr); |
140 |
|
|
141 |
/** |
/** |
142 |
* Moves the specified instrument one position down in the instrument list. |
* Moves the specified instrument one position down in the instrument list. |
145 |
* or if the instrument is already at the bottom. |
* or if the instrument is already at the bottom. |
146 |
* @param instr The instrument to move down. |
* @param instr The instrument to move down. |
147 |
*/ |
*/ |
148 |
public void moveInstrumentDown(Instrument instr); |
public void moveInstrumentDown(OrchestraInstrument instr); |
149 |
|
|
150 |
/** |
/** |
151 |
* Moves the specified instrument at the bottom of the instrument list. |
* Moves the specified instrument at the bottom of the instrument list. |
154 |
* or if the instrument is already at the bottom. |
* or if the instrument is already at the bottom. |
155 |
* @param instr The instrument to move at bottom. |
* @param instr The instrument to move at bottom. |
156 |
*/ |
*/ |
157 |
public void moveInstrumentAtBottom(Instrument instr); |
public void moveInstrumentAtBottom(OrchestraInstrument instr); |
158 |
|
|
159 |
/** |
/** |
160 |
* Reads and sets the content of this orchestra provided by <code>node</code>. |
* Reads and sets the content of this orchestra provided by <code>node</code>. |