|
||||||||||
| 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.FunctionNode<Action>
com.epochx.representation.action.Seq2Function
public class Seq2Function
A FunctionNode which provides the facility to sequence two
instructions - which may be other functions or terminal nodes with actions.
| Constructor Summary | |
|---|---|
Seq2Function()
Construct a Seq2Function with no children. |
|
Seq2Function(Node<Action> child1,
Node<Action> child2)
Construct a Seq2Function with two children. |
|
| Method Summary | |
|---|---|
Action |
evaluate()
Evaluating a Seq2Function involves evaluating each of the
children in sequence - the first child node, followed by the second
child node. |
java.lang.String |
getFunctionName()
Get the unique name that identifies this function. |
| Methods inherited from class com.epochx.representation.FunctionNode |
|---|
equals, toString |
| Methods inherited from class com.epochx.representation.Node |
|---|
clone, getArity, getChild, getChildren, getDepth, getFunctionNodes, getLength, getNodesAtDepth, getNoDistinctFunctions, getNoDistinctTerminals, getNoFunctions, getNoTerminals, getNthNode, getTerminalNodes, hashCode, setChild, setChildren, setNthNode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Seq2Function()
public Seq2Function(Node<Action> child1,
Node<Action> child2)
child1 - The first child node to be executed first in sequence.child2 - The second child node to be executed second in sequence.| Method Detail |
|---|
public Action evaluate()
Seq2Function involves evaluating each of the
children in sequence - the first child node, followed by the second
child node.
Each of the children will thus have been evaluated (triggering
execution of actions at the TerminalNodes) and then this
method which must return an Action, returns Action.DO_NOTHING which any
functions higher up in the program tree will execute, but with no
effect.
evaluate in class Node<Action>public java.lang.String getFunctionName()
getFunctionName in class FunctionNode<Action>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||