/[svn]/jlscp/trunk/src/org/linuxsampler/lscp/MidiPort.java
ViewVC logotype

Diff of /jlscp/trunk/src/org/linuxsampler/lscp/MidiPort.java

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

revision 783 by iliev, Wed Jun 1 07:11:31 2005 UTC revision 784 by iliev, Mon Oct 10 14:55:44 2005 UTC
# Line 30  import java.util.Vector; Line 30  import java.util.Vector;
30   * @author  Grigor Iliev   * @author  Grigor Iliev
31   */   */
32  public class MidiPort {  public class MidiPort {
33          private String name = null;          private Parameter<String> name;
34          private final Vector<Parameter> prmList = new Vector<Parameter>();          private final Vector<Parameter> prmList = new Vector<Parameter>();
35                    
36          /**          /**
# Line 38  public class MidiPort { Line 38  public class MidiPort {
38           * @return The name of this MIDI port.           * @return The name of this MIDI port.
39           */           */
40          public String          public String
41          getName() { return name; }          getName() { return name == null ? null : name.getValue(); }
42                    
43          /**          /**
44           * Sets the name of this MIDI port.           * Gets the <code>NAME</code> parameter.
45           * @param name A <code>String</code> object containing the new name for this MIDI port.           * @return A <code>Parameter<String></code> instance.
46             */
47            public Parameter<String>
48            getNameParameter() { return name; }
49            
50            /**
51             * Sets the <code>NAME</code> parameter.
52             * @param name A <code>Parameter<String></code> instance.
53           */           */
54          public void          public void
55          setName(String name) { this.name = name; }          setNameParameter(Parameter<String> name) { this.name = name; }
56                    
57          /**          /**
58           * Adds additional parameter to this MIDI port.           * Adds additional parameter to this MIDI port.
# Line 70  public class MidiPort { Line 77  public class MidiPort {
77          hasAdditionalParameters() { return !prmList.isEmpty(); }          hasAdditionalParameters() { return !prmList.isEmpty(); }
78                    
79          /**          /**
80             * Gets a <code>Parameter</code> array providing all parameters
81             * of this MIDI port (including <code>NAME</code> parameter).
82             * @return A <code>Parameter</code> array providing all parameters
83             * of this MIDI port.
84             */
85            public Parameter[]
86            getAllParameters() {
87                    Parameter[] params = new Parameter[prmList.size() + 1];
88                    params[0] = getNameParameter();
89                    for(int i = 0; i < prmList.size(); i++) params[i + 1] = prmList.get(i);
90                    return params;
91            }
92            
93            /**
94           * Returns the name of this MIDI port.           * Returns the name of this MIDI port.
95           * @return The name of this MIDI port.           * @return The name of this MIDI port.
96           */           */

Legend:
Removed from v.783  
changed lines
  Added in v.784

  ViewVC Help
Powered by ViewVC