public abstract class BinaryExpression extends AbstractExpression
| Modifier and Type | Field and Description |
|---|---|
protected Expression |
m_left |
protected int |
m_op |
protected Expression |
m_right |
| Modifier | Constructor and Description |
|---|---|
protected |
BinaryExpression(int operation,
int minOp,
int maxOp,
Expression left,
Expression right)
Create a new BinaryExpression.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addChildListeners()
Add child listeners to catch and propagate sub-expression updates.
|
Expression |
getLeftExpression()
Get the left sub-expression.
|
int |
getOperation()
Get the operation code for this expression.
|
Expression |
getRightExpression()
Get the right sub-expression.
|
protected void |
removeChildListeners()
Remove child listeners for sub-expression updates.
|
void |
setLeftExpression(Expression e)
Set the left sub-expression.
|
void |
setRightExpression(Expression e)
Set the right sub-expression.
|
void |
visit(ExpressionVisitor v)
Passes the visitor through this expression and any sub expressions
|
addExpressionListener, expressionChanged, fireExpressionChange, get, getBoolean, getDouble, getFloat, getInt, getLong, hasListeners, removeExpressionListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeprotected int m_op
protected Expression m_left
protected Expression m_right
protected BinaryExpression(int operation,
int minOp,
int maxOp,
Expression left,
Expression right)
operation - int value indicating the operation to be
performed on the subtrees. The actual range of acceptable values
are determined by subclasses.minOp - the minimum legal operation code valuemaxOp - the maximum legal operation code valueleft - the left sub-expressionright - the right sub-expressionpublic Expression getLeftExpression()
public Expression getRightExpression()
public void setLeftExpression(Expression e)
e - the left sub-expression to usepublic void setRightExpression(Expression e)
e - the right sub-expression to usepublic int getOperation()
public void visit(ExpressionVisitor v)
Expressionvisit in interface Expressionvisit in class AbstractExpressionv - the ExpressionVisitorExpression.visit(prefuse.data.expression.ExpressionVisitor)protected void addChildListeners()
AbstractExpressionaddChildListeners in class AbstractExpressionAbstractExpression.addChildListeners()protected void removeChildListeners()
AbstractExpressionremoveChildListeners in class AbstractExpressionAbstractExpression.removeChildListeners()