A base class for AdditionExpressionNode and MultiplicationExpressionNode. More...


Classes | |
| class | Term |
| An inner class that defines a pair containing an ExpressionNode and a boolean flag. More... | |
Public Member Functions | |
| SequenceExpressionNode () | |
| Default constructor. | |
| SequenceExpressionNode (ExpressionNode a, boolean positive) | |
| Constructor to create a sequence with the first term already added. | |
| void | add (ExpressionNode node, boolean positive) |
| Add another term to the sequence. | |
Public Member Functions inherited from uk.co.cogitolearning.cogpar.ExpressionNode | |
| int | getType () |
| Returns the type of the node.ExpressionNode. | |
| double | getValue () |
| Calculates and returns the value of the sub-expression represented by the node. | |
| void | accept (ExpressionNodeVisitor visitor) |
| Method needed for the visitor design pattern. | |
Protected Attributes | |
| ArrayList< Term > | terms |
| the list of terms in the sequence | |
Additional Inherited Members | |
Static Public Attributes inherited from uk.co.cogitolearning.cogpar.ExpressionNode | |
| static final int | VARIABLE_NODE = 1 |
| Node id for variable nodes. | |
| static final int | CONSTANT_NODE = 2 |
| Node id for constant nodes. | |
| static final int | ADDITION_NODE = 3 |
| Node id for addition nodes. | |
| static final int | MULTIPLICATION_NODE = 4 |
| Node id for multiplication nodes. | |
| static final int | EXPONENTIATION_NODE = 5 |
| Node id for exponentiation nodes. | |
| static final int | FUNCTION_NODE = 6 |
| Node id for function nodes. | |
A base class for AdditionExpressionNode and MultiplicationExpressionNode.
Holds an arbitrary number of ExpressionNodes together with boolean flags.
Definition at line 35 of file SequenceExpressionNode.java.
| uk.co.cogitolearning.cogpar.SequenceExpressionNode.SequenceExpressionNode | ( | ExpressionNode | a, |
| boolean | positive | ||
| ) |
Constructor to create a sequence with the first term already added.
| node | the term to be added |
| positive | a boolean flag |
Definition at line 80 of file SequenceExpressionNode.java.
| void uk.co.cogitolearning.cogpar.SequenceExpressionNode.add | ( | ExpressionNode | node, |
| boolean | positive | ||
| ) |
Add another term to the sequence.
| node | the term to be added |
| positive | a boolean flag |
Definition at line 93 of file SequenceExpressionNode.java.
1.8.1.2