org.gridbus.broker.runfile
Class ListVariable

java.lang.Object
  extended by org.gridbus.broker.runfile.Variable
      extended by org.gridbus.broker.runfile.ListVariable
All Implemented Interfaces:
java.io.Serializable

public class ListVariable
extends Variable

Author:
hussein Represents a run file variable which can have multiple values, as with list variables.
See Also:
Serialized Form

Constructor Summary
ListVariable(java.lang.String name)
          Constructs a ListVariable with a name.
ListVariable(java.lang.String name, java.lang.String values)
          Constructs a ListVariable with a name and a String representation of a set of possible values for this variable.
ListVariable(java.lang.String name, java.lang.String[] values)
          Constructs a ListVariable with a name and a set of possible values for this variable.
 
Method Summary
 java.lang.String getValue(int index)
          Gets the value of this variable at the specified index.
 java.lang.String[] getValues()
          Gets the set of values for this variable.
 void setValues(java.lang.String values_string)
          Sets the set of possible values of this variable using a String representation of the set.
 void setValues(java.lang.String[] values)
          Sets the set of possible values of this variable.
 
Methods inherited from class org.gridbus.broker.runfile.Variable
getName, getType, setName, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListVariable

public ListVariable(java.lang.String name)
Constructs a ListVariable with a name.

Parameters:
name -

ListVariable

public ListVariable(java.lang.String name,
                    java.lang.String[] values)
Constructs a ListVariable with a name and a set of possible values for this variable.

Parameters:
name -
values -

ListVariable

public ListVariable(java.lang.String name,
                    java.lang.String values)
Constructs a ListVariable with a name and a String representation of a set of possible values for this variable.

Parameters:
name -
values -
Method Detail

setValues

public void setValues(java.lang.String[] values)
Sets the set of possible values of this variable.

Parameters:
values - set of possible values for this variable.

setValues

public void setValues(java.lang.String values_string)
Sets the set of possible values of this variable using a String representation of the set.

Parameters:
values_string - String representation of the set of possible values for this variable.

getValue

public java.lang.String getValue(int index)
Gets the value of this variable at the specified index.

Parameters:
index - the index of a value of this variable.
Returns:
the value of this variable at the given index.

getValues

public java.lang.String[] getValues()
Gets the set of values for this variable.

Returns:
the set of possible values for this variable.