|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprefuse.data.expression.AbstractExpression
prefuse.data.expression.IfExpression
Expression instance representing an "if then else" clause in the prefuse expression language.
Constructor Summary | |
IfExpression(Predicate test,
Expression thenExpr,
Expression elseExpr)
Create a new IfExpression. |
Method Summary | |
protected void |
addChildListeners()
Add child listeners to catch and propagate sub-expression updates. |
java.lang.Object |
get(Tuple t)
By default, throws an UnsupportedOperationException. |
boolean |
getBoolean(Tuple t)
By default, throws an UnsupportedOperationException. |
double |
getDouble(Tuple t)
By default, throws an UnsupportedOperationException. |
Expression |
getElseExpression()
Get the else expression |
float |
getFloat(Tuple t)
By default, throws an UnsupportedOperationException. |
int |
getInt(Tuple t)
By default, throws an UnsupportedOperationException. |
long |
getLong(Tuple t)
By default, throws an UnsupportedOperationException. |
Predicate |
getTestPredicate()
Get the test predicate. |
Expression |
getThenExpression()
Get the then expression |
java.lang.Class |
getType(Schema s)
Returns the type that this expression evaluates to when tuples with the given Schema are provided as input. |
protected void |
removeChildListeners()
Remove child listeners for sub-expression updates. |
void |
setElseExpression(Expression e)
Set the else expression |
void |
setTestPredicate(Predicate p)
Set the test predicate. |
void |
setThenExpression(Expression e)
Set the then expression |
java.lang.String |
toString()
|
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, hasListeners, removeExpressionListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IfExpression(Predicate test, Expression thenExpr, Expression elseExpr)
test
- the predicate test for the if statementthenExpr
- the expression to evaluate if the test predicate
evaluates to trueelseExpr
- the expression to evaluate if the test predicate
evaluates to falseMethod Detail |
public Predicate getTestPredicate()
public Expression getThenExpression()
public Expression getElseExpression()
public void setTestPredicate(Predicate p)
p
- the test predicatepublic void setThenExpression(Expression e)
e
- the then expression to setpublic void setElseExpression(Expression e)
e
- the else expression to setpublic java.lang.Class getType(Schema s)
Expression
Expression.getType(prefuse.data.Schema)
public java.lang.Object get(Tuple t)
AbstractExpression
get
in interface Expression
get
in class AbstractExpression
Expression.get(prefuse.data.Tuple)
public boolean getBoolean(Tuple t)
AbstractExpression
getBoolean
in interface Expression
getBoolean
in class AbstractExpression
Expression.getBoolean(prefuse.data.Tuple)
public double getDouble(Tuple t)
AbstractExpression
getDouble
in interface Expression
getDouble
in class AbstractExpression
Expression.getDouble(prefuse.data.Tuple)
public float getFloat(Tuple t)
AbstractExpression
getFloat
in interface Expression
getFloat
in class AbstractExpression
Expression.getFloat(prefuse.data.Tuple)
public int getInt(Tuple t)
AbstractExpression
getInt
in interface Expression
getInt
in class AbstractExpression
Expression.getInt(prefuse.data.Tuple)
public long getLong(Tuple t)
AbstractExpression
getLong
in interface Expression
getLong
in class AbstractExpression
Expression.getLong(prefuse.data.Tuple)
public void visit(ExpressionVisitor v)
Expression
visit
in interface Expression
visit
in class AbstractExpression
Expression.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()
public java.lang.String toString()
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |