org.grinvin.invariants
Class BooleanValue
public class BooleanValue
Invariant type which allows boolean values.
Identified by the string boolean
.
double | asDouble() - Return the actual value as a real number.
|
void | loadValue(Element element) - Should be overridden to load the actual value from a JDOM-element.
|
void | saveValue(Element element) - Should be overridden to save the actual value into a JDOM-element.
|
String | toText() - Convert this value to a string, so it can be displayed
as part of a GUI.
|
BooleanValue
public BooleanValue(boolean value,
InvariantComputer computer)
Create an object of this type with the given boolean value.
asDouble
public double asDouble()
Return the actual value as a real number.
- asDouble in interface InvariantValue
loadValue
public void loadValue(Element element)
Should be overridden to load the actual value from a JDOM-element.
Clients should throw an IOFormatException when element is not
in the correct format.
- loadValue in interface InvariantValue
element
- JDOM element, which is known to be of type
'value'
saveValue
public void saveValue(Element element)
Should be overridden to save the actual value into a JDOM-element.
- saveValue in interface InvariantValue
element
- JDOM element, which is of type 'value'
toText
public String toText()
Convert this value to a string, so it can be displayed
as part of a GUI.
- toText in interface InvariantValue