E
- the Enum
set of which the valid values are a sub setpublic class EnumVariable<E extends java.lang.Enum<E>> extends SimpleVariable
Variable
who's values are a sub set of an Enum
.Constructor and Description |
---|
EnumVariable(E value)
creates a variable with an initial value.
|
EnumVariable(E value,
java.util.EnumSet<E> validValues)
creates a variable with an initial value and a set of valid values.
|
Modifier and Type | Method and Description |
---|---|
void |
setValue(java.lang.Object value)
sets the variable's value.
|
getValue, setValidator, validate
addObserver, clone, fireChangeEvent, removeObserver
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addObserver, clone, fireChangeEvent, removeObserver
public EnumVariable(E value)
value
- the initial valuepublic void setValue(java.lang.Object value)
setValue
in interface Variable
setValue
in class SimpleVariable
value
- the value to set variable tojava.lang.IllegalArgumentException
- if the value
is not in the list of valid values