|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.util.PredicateChain
public class PredicateChain
A chain of Predicates and associated values, maintain a large if-statement structure for looking up values based on a Predicate condition.
Constructor Summary | |
---|---|
PredicateChain()
|
Method Summary | |
---|---|
void |
add(Predicate p,
java.lang.Object val)
Add a new rule to the end of the chain, associating a Predicate condition with an Object value. |
void |
clear()
Remove all rules from the predicate chain. |
java.lang.Object |
get(Tuple t)
Evaluate the predicate chain for the given Tuple. |
Expression |
getExpression()
Return the backing predicate chain as an Expression instance. |
boolean |
remove(Predicate p)
Remove rules using the given predicate from this predicate chain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PredicateChain()
Method Detail |
---|
public Expression getExpression()
public java.lang.Object get(Tuple t)
t
- the Tuple
public void add(Predicate p, java.lang.Object val)
p
- the Predicate conditionval
- the associated Object valuepublic boolean remove(Predicate p)
p
- the predicate to remove from the chain
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |