|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.epochx.representation.Node<TYPE>
com.epochx.representation.TerminalNode<TYPE>
com.epochx.representation.Variable<TYPE>
public class Variable<TYPE>
A variable is a data type which can be used as a TerminalNode
in place of a predefined constant. Variables can thus have their values
changed which will change the result of evaluation.
| Constructor Summary | |
|---|---|
Variable(java.lang.String label)
Constructor for a new variable instance. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Variables cannot be cloned. |
boolean |
equals(java.lang.Object obj)
Compares an object for equivalence to this instance of Variable. |
java.lang.String |
getLabel()
Returns the label of the variable. |
void |
setLabel(java.lang.String label)
Replaces the variable's label with a new name. |
java.lang.String |
toString()
Return a string representation of the variable. |
| Methods inherited from class com.epochx.representation.TerminalNode |
|---|
evaluate, getValue, hashCode, setValue |
| Methods inherited from class com.epochx.representation.Node |
|---|
getArity, getChild, getChildren, getDepth, getFunctionNodes, getLength, getNodesAtDepth, getNoDistinctFunctions, getNoDistinctTerminals, getNoFunctions, getNoTerminals, getNthNode, getTerminalNodes, setChild, setChildren, setNthNode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Variable(java.lang.String label)
label - the variable's name.| Method Detail |
|---|
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label - the new label to assign to the variable.public java.lang.String toString()
toString in class TerminalNode<TYPE>public boolean equals(java.lang.Object obj)
equals in class TerminalNode<TYPE>obj - an object to compare for equivalence.
public java.lang.Object clone()
clone in class TerminalNode<TYPE>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||