|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.data.expression.AbstractExpression prefuse.data.expression.BinaryExpression
public abstract class BinaryExpression
Abstract base class for Expression implementations that maintain two sub-expressions. These are referred to as the left expression (the first one) and the right expression (the second one).
Field Summary | |
---|---|
protected Expression |
m_left
|
protected int |
m_op
|
protected Expression |
m_right
|
Constructor Summary | |
---|---|
protected |
BinaryExpression(int operation,
int minOp,
int maxOp,
Expression left,
Expression right)
Create a new BinaryExpression. |
Method Summary | |
---|---|
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 |
Methods inherited from class prefuse.data.expression.AbstractExpression |
---|
addExpressionListener, expressionChanged, fireExpressionChange, get, getBoolean, getDouble, getFloat, getInt, getLong, hasListeners, removeExpressionListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface prefuse.data.expression.Expression |
---|
getType |
Field Detail |
---|
protected int m_op
protected Expression m_left
protected Expression m_right
Constructor Detail |
---|
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-expressionMethod Detail |
---|
public 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)
Expression
visit
in interface Expression
visit
in class AbstractExpression
v
- the ExpressionVisitorExpression.visit(prefuse.data.expression.ExpressionVisitor)
protected void addChildListeners()
AbstractExpression
addChildListeners
in class AbstractExpression
AbstractExpression.addChildListeners()
protected void removeChildListeners()
AbstractExpression
removeChildListeners
in class AbstractExpression
AbstractExpression.removeChildListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |