|
||||||||||
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.AbstractPredicate prefuse.data.expression.CompositePredicate
public abstract class CompositePredicate
Abstract base class for Predicate instances that maintain one or more sub-predicates (clauses).
Field Summary | |
---|---|
protected java.util.ArrayList |
m_clauses
|
Constructor Summary | |
---|---|
CompositePredicate()
Create a new, empty CompositePredicate. |
|
CompositePredicate(Predicate p1,
Predicate p2)
Create a new CompositePredicate. |
Method Summary | |
---|---|
void |
add(Predicate p)
Add a new clause. |
protected void |
addChildListeners()
Add child listeners to catch and propagate sub-expression updates. |
void |
clear()
Remove all clauses. |
Predicate |
get(int idx)
Get the sub-predicate at the given index. |
Predicate |
getSubPredicate(Predicate p)
Get a predicate instance just like this one but without the given predicate as a clause. |
boolean |
remove(Predicate p)
Remove a new clause. |
protected void |
removeChildListeners()
Remove child listeners for sub-expression updates. |
void |
set(Predicate p)
Set the given predicate to be the only clause of thie composite. |
void |
set(Predicate[] p)
Set the given predicates to be the clauses of thie composite. |
int |
size()
Get the number of sub-predicate clauses. |
protected java.lang.String |
toString(java.lang.String op)
Return a String representation of this predicate. |
void |
visit(ExpressionVisitor v)
Passes the visitor through this expression and any sub expressions |
Methods inherited from class prefuse.data.expression.AbstractPredicate |
---|
get, getType |
Methods inherited from class prefuse.data.expression.AbstractExpression |
---|
addExpressionListener, expressionChanged, fireExpressionChange, 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 |
---|
addExpressionListener, getBoolean, getDouble, getFloat, getInt, getLong, removeExpressionListener |
Field Detail |
---|
protected java.util.ArrayList m_clauses
Constructor Detail |
---|
public CompositePredicate()
public CompositePredicate(Predicate p1, Predicate p2)
p1
- the first sub-predicatep2
- the second sub-predicateMethod Detail |
---|
public void add(Predicate p)
p
- the Predicate clause to addpublic boolean remove(Predicate p)
p
- the Predicate clause to remove
public void clear()
public int size()
public Predicate get(int idx)
idx
- the index to lookup
public void set(Predicate p)
p
- the new sole sub-predicate clausepublic void set(Predicate[] p)
p
- the new sub-predicate clausespublic Predicate getSubPredicate(Predicate p)
p
- the predicate clause to ignore
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()
protected java.lang.String toString(java.lang.String op)
op
- a String describing the operation this Predicate performs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |