public class IfInteger extends ProgramNode
children, parent, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_INT, TYPE_UNDEFINED, values| Constructor and Description |
|---|
IfInteger()
Constructing the function with three operands.
|
IfInteger(Element n)
Creates the function via XML.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
eval()
Evaluates the if condition and returns the value of the corresponding path.
|
int |
getOperandType(int index)
Returns the operand type for all children.
|
int |
getResultType()
Returns the result type.
|
java.lang.String |
getSignature()
Returns the string signature of the node.
|
void |
mutate()
Exchanges true and false path.
|
java.lang.String |
toString()
Returns the string representation of the node.
|
addValue, children, clearValues, clone, create, equals, getAllowsChildren, getChildAt, getChildCount, getIndex, getLevel, getParent, hashCode, insert, isLeaf, randomize, remove, remove, removeFromParent, setParent, setUserObject, toXmlpublic IfInteger()
public IfInteger(Element n)
n - an XML node elementpublic int getOperandType(int index)
getOperandType in class ProgramNodeindex - a child indexpublic int getResultType()
getResultType in class ProgramNodepublic java.lang.Object eval()
eval in class ProgramNodepublic void mutate()
mutate in class ProgramNodepublic java.lang.String getSignature()
getSignature in class ProgramNodepublic java.lang.String toString()
toString in class ProgramNode