org.imemex.predicates
Class And
java.lang.Object
org.imemex.predicates.BinaryPredicate
org.imemex.predicates.And
- All Implemented Interfaces:
- Predicate
public class And
- extends BinaryPredicate
|
Method Summary |
Predicate |
copy()
makes an exact copy of this predicate |
boolean |
equals(Predicate p,
boolean deep)
Compares this predicate to the given predicate p. |
|
eval(java.util.Map<java.lang.String,T> variableBindings)
Evaluates the predicate with the given map of pairs. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
And
public And(Predicate predicate1,
Predicate predicate2)
eval
public <T> boolean eval(java.util.Map<java.lang.String,T> variableBindings)
throws UnboundVariableException
- Description copied from interface:
Predicate
- Evaluates the predicate with the given map of pairs.
- Parameters:
variableBindings - - a map that specifies the bindings for the predicate variables.
- Returns:
- true, if the predicate is true; false, otherwise.
- Throws:
UnboundVariableException - - if some variable necessary to evaluate the predicate was not bound.
equals
public boolean equals(Predicate p,
boolean deep)
- Description copied from interface:
Predicate
- Compares this predicate to the given predicate p.
deep - true if type, variable names, and values have to match,
false if only type has to match.
- Returns:
copy
public Predicate copy()
- Description copied from interface:
Predicate
- makes an exact copy of this predicate
- Returns: