/[svn]/jsampler/trunk/src/org/jsampler/DefaultSamplerModel.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/DefaultSamplerModel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1284 by iliev, Thu May 24 21:43:45 2007 UTC revision 1285 by iliev, Fri Aug 10 19:55:03 2007 UTC
# Line 418  public class DefaultSamplerModel impleme Line 418  public class DefaultSamplerModel impleme
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>.

Legend:
Removed from v.1284  
changed lines
  Added in v.1285

  ViewVC Help
Powered by ViewVC