com.togethersoft.sca.core
Interface IParameterStringEnum

All Superinterfaces:
IParameter

public interface IParameterStringEnum
extends IParameter

Represents a string parameter that can be chosen from a set of predefined alternatives.


Fields inherited from interface com.togethersoft.sca.core.IParameter
BOOLEAN, INTEGER, LIST, REAL, STRING, STRING_ENUM
 
Method Summary
 java.lang.String[] getEnumValues()
          Returns an array of values allowed for this parameter.
 int getOrdinalValue()
          Returns the ordinal number of the current parameter value.
 java.lang.String getValue()
          Returns the current value of this parameter.
 boolean setValue(int index)
          Sets the current value of this parameter to the value with the specified index.
 boolean setValue(java.lang.String value)
          Sets the current value of this parameter.
 
Methods inherited from interface com.togethersoft.sca.core.IParameter
clone, getId, getName, getType, isRemovable
 

Method Detail

getEnumValues

public java.lang.String[] getEnumValues()
Returns an array of values allowed for this parameter.

getOrdinalValue

public int getOrdinalValue()
Returns the ordinal number of the current parameter value. Returns -1 if the current value is not defined.

getValue

public java.lang.String getValue()
Returns the current value of this parameter. Returns an empty string ("") if the current value is not defined.
Returns:
the value of this parameter.

setValue

public boolean setValue(int index)
Sets the current value of this parameter to the value with the specified index. Returns true if the parameter value was changed successfully. Returns false if the value with the specified index does not exist.
Parameters:
index - specifies the new value index.

setValue

public boolean setValue(java.lang.String value)
Sets the current value of this parameter. Returns true if the parameter value was changed successfully. Returns false if the new value is not contained in the set of allowed parameter values.
Parameters:
value - specifies the new value.