418 |
} |
} |
419 |
|
|
420 |
/** |
/** |
421 |
|
* Gets the position of the specified MIDI instrument map in the list. |
422 |
|
* @param map The map whose index should be returned. |
423 |
|
* @return The position of the specified map in the list, |
424 |
|
* or -1 if <code>map</code> is <code>null</code> or |
425 |
|
* the map list does not contain the specified map. |
426 |
|
*/ |
427 |
|
public int |
428 |
|
getMidiInstrumentMapIndex(MidiInstrumentMap map) { |
429 |
|
if(map == null) return -1; |
430 |
|
|
431 |
|
for(int i = 0; i < getMidiInstrumentMapCount(); i++) { |
432 |
|
if(getMidiInstrumentMap(i) == map) return i; |
433 |
|
} |
434 |
|
|
435 |
|
return -1; |
436 |
|
} |
437 |
|
|
438 |
|
/** |
439 |
* Adds the specified MIDI instrument map. |
* Adds the specified MIDI instrument map. |
440 |
* @param map The MIDI instrument map to be added. |
* @param map The MIDI instrument map to be added. |
441 |
* @throws IllegalArgumentException If <code>map</code> is <code>null</code>. |
* @throws IllegalArgumentException If <code>map</code> is <code>null</code>. |