net.sf.opendse.model.parameter
Class ParameterSelect

java.lang.Object
  extended by net.sf.opendse.model.parameter.ParameterSelect
All Implemented Interfaces:
Parameter

public class ParameterSelect
extends java.lang.Object
implements Parameter

The ParameterSelect is a parameter that selects from a set of elements.


Field Summary
protected  java.lang.Object[] elements
           
protected  java.lang.String reference
           
protected  java.lang.Object value
           
 
Constructor Summary
ParameterSelect(java.lang.Object value, java.lang.String reference, java.util.List<java.lang.Object> elements)
          Constructs a ParameterSelect.
 
Method Summary
 java.lang.Object[] getElements()
          Returns the set of available elements.
 java.lang.String getReference()
          Returns the reference of the parameter.
 java.lang.Object getValue()
          Returns the current value of the parameter.
 int indexOf(java.lang.Object o)
          Returns the first index of the object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected final java.lang.Object value

elements

protected final java.lang.Object[] elements

reference

protected final java.lang.String reference
Constructor Detail

ParameterSelect

public ParameterSelect(java.lang.Object value,
                       java.lang.String reference,
                       java.util.List<java.lang.Object> elements)
Constructs a ParameterSelect.

Parameters:
value - the default value
reference - the reference parameter
elements - the set of available elements
Method Detail

getValue

public java.lang.Object getValue()
Description copied from interface: Parameter
Returns the current value of the parameter.

Specified by:
getValue in interface Parameter
Returns:
the parameter value

getElements

public java.lang.Object[] getElements()
Returns the set of available elements.

Returns:
the set of elements

getReference

public java.lang.String getReference()
Returns the reference of the parameter.

Returns:
the reference

indexOf

public int indexOf(java.lang.Object o)
Returns the first index of the object.

Parameters:
o - the object
Returns:
the index

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object