public abstract class CompositePredicate extends AbstractPredicate
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList |
m_clauses |
| Constructor and Description |
|---|
CompositePredicate()
Create a new, empty CompositePredicate.
|
CompositePredicate(Predicate p1,
Predicate p2)
Create a new CompositePredicate.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
get, getTypeaddExpressionListener, expressionChanged, fireExpressionChange, getBoolean, getDouble, getFloat, getInt, getLong, hasListeners, removeExpressionListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddExpressionListener, getBoolean, getDouble, getFloat, getInt, getLong, removeExpressionListenerpublic CompositePredicate()
public void add(Predicate p)
p - the Predicate clause to addpublic boolean remove(Predicate p)
p - the Predicate clause to removepublic void clear()
public int size()
public Predicate get(int idx)
idx - the index to lookuppublic 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 ignorepublic 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()protected java.lang.String toString(java.lang.String op)
op - a String describing the operation this Predicate performs