Operator.Value| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Operator<T>> |
m_operands |
protected java.lang.String |
m_symbol |
| Constructor and Description |
|---|
NaryOperator(java.lang.String symbol) |
NaryOperator(java.lang.String symbol,
java.lang.Object... ops) |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptPostfix(HologramVisitor<T> visitor,
boolean in_tree)
Accepts a hologram visitor into the evaluation tree for this
operator
|
void |
acceptPrefix(HologramVisitor<T> visitor,
boolean in_tree)
Accepts a hologram visitor into the evaluation tree for this
operator
|
void |
addOperand(Operator<T> op)
Adds an operand to this operator
|
int |
childrenCount()
Gets the number of children in the expression
|
protected boolean |
childrenEquals(NaryOperator<T> o)
Checks whether the children of this operator are equal to that of
another n-ary operator.
|
void |
clean()
Cleans the deleted nodes of the evaluation tree
|
void |
clear()
Clears the state of this operator
|
protected void |
copyInto(NaryOperator<T> o,
boolean with_tree)
Copies the internal content of this operator into a new instance
|
void |
delete()
Marks a node as deleted
|
java.lang.String |
getRootSymbol()
Gets the symbol of the operator for the root of the evaluation tree
|
java.util.List<Operator<T>> |
getTreeChildren()
Gets the ordered list of the children in the evaluation tree for this
operator
|
protected int |
hashCode(int start_value)
Computes the hash code of this n-ary operator, starting from
an initial value
|
int |
size(boolean with_tree)
Gets the size of this formula
|
java.lang.String |
toString() |
public NaryOperator(java.lang.String symbol)
public NaryOperator(java.lang.String symbol,
java.lang.Object... ops)
public void addOperand(Operator<T> op)
OperatoraddOperand in class Operator<T extends Event>op - The operandprotected int hashCode(int start_value)
start_value - The initial valueprotected boolean childrenEquals(NaryOperator<T> o)
o - The other operatorprotected void copyInto(NaryOperator<T> o, boolean with_tree)
o - The new instancewith_tree - Set to true to also copy data related
to the operator's evaluation treepublic java.lang.String toString()
toString in class java.lang.Objectpublic void acceptPrefix(HologramVisitor<T> visitor, boolean in_tree)
OperatoracceptPrefix in class Operator<T extends Event>visitor - The visitorin_tree - Whether to visit the evaluation tree (true) or
the formula (false)public void acceptPostfix(HologramVisitor<T> visitor, boolean in_tree)
OperatoracceptPostfix in class Operator<T extends Event>visitor - The visitorin_tree - Whether to visit the evaluation tree (true) or
the formula (false)public java.lang.String getRootSymbol()
OperatorgetRootSymbol in class Operator<T extends Event>public int size(boolean with_tree)
Operatorpublic int childrenCount()
public java.util.List<Operator<T>> getTreeChildren()
OperatorgetTreeChildren in class Operator<T extends Event>public void delete()
Operatorpublic void clear()
OperatorCopyright © Sylvain HallĂ©. All Rights Reserved.