T - The event typepublic abstract class UnaryOperator<T extends Event> extends Operator<T>
Operator.Value| Modifier and Type | Field and Description |
|---|---|
protected Operator<T> |
m_operand
The operand of this unary operator
|
protected java.lang.String |
m_symbol
The symbol to display for this operator
|
| Constructor and Description |
|---|
UnaryOperator(java.lang.String symbol)
Creates a new unary operator
|
UnaryOperator(java.lang.String symbol,
Operator<T> operand) |
| 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
|
void |
clean()
Cleans the deleted nodes of the evaluation tree
|
void |
clear()
Clears the state of this operator
|
protected void |
copyInto(UnaryOperator<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
|
int |
size(boolean with_tree)
Gets the size of this formula
|
java.lang.String |
toString() |
protected final java.lang.String m_symbol
public UnaryOperator(java.lang.String symbol)
symbol - The symbol to display for this operatorpublic void addOperand(Operator<T> op)
OperatoraddOperand in class Operator<T extends Event>op - The operandprotected void copyInto(UnaryOperator<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 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.