public class ConstInteger extends ProgramNode
children, parent, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_INT, TYPE_UNDEFINED, values| Constructor and Description |
|---|
ConstInteger(Element n)
Creates the constant via XML.
|
ConstInteger(int low,
int high)
Constructs the constant within boundaries.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
eval()
Returns the constant value.
|
int |
getResultType()
Returns the result type int.
|
java.lang.String |
getSignature()
Returns the string signature of the node.
|
void |
mutate()
Mutates value by drawing a random value within boundaries.
|
void |
randomize()
Assigns a random constant value within boundaries.
|
java.lang.String |
toString()
Returns the string representation of the node.
|
Element |
toXml(Element parent)
Saves the constant to XML.
|
addValue, children, clearValues, clone, create, equals, getAllowsChildren, getChildAt, getChildCount, getIndex, getLevel, getOperandType, getParent, hashCode, insert, isLeaf, remove, remove, removeFromParent, setParent, setUserObjectpublic ConstInteger(int low,
int high)
low - the lower boundhigh - the upper boundpublic ConstInteger(Element n)
n - an XML node elementpublic int getResultType()
getResultType in class ProgramNodepublic java.lang.Object eval()
eval in class ProgramNodepublic void randomize()
randomize in class ProgramNodepublic void mutate()
mutate in class ProgramNodepublic Element toXml(Element parent)
toXml in class ProgramNodeparent - the JDOM parent elementpublic java.lang.String getSignature()
getSignature in class ProgramNodepublic java.lang.String toString()
toString in class ProgramNode