net.sf.jga.fn.logical
public class All<T> extends AbstractUnaryPredicate<T> implements Serializable
The order of evaluation is dependant on the type of collection used: when using the default constructor, the collection used is a list, and branch predicates will be evaluated in the order given.
Copyright © 2002 David A. Hall
Nested Class Summary | |
---|---|
interface | All.Visitor
Interface for classes that may interpret an All predicate. |
Constructor Summary | |
---|---|
All()
Builds the All predicate with an empty default collection of branch
predicates. | |
All(Collection<UnaryFunctor<T,Boolean>> branches)
Builds the All predicate with the given collection of branch predicates.
|
Method Summary | |
---|---|
void | accept(Visitor v)
Calls the Visitor's visit(All) method, if it
implements the nested Visitor interface. |
void | addBranch(UnaryFunctor<T,Boolean> pred)
Adds the predicate to the collection of branch predicates. |
Iterator<UnaryFunctor<T,Boolean>> | branches()
Returns an Iterator over the branch predicates. |
boolean | p(T x)
Given arguments x, returns true if all branch predicates return
true when given x. |
String | toString() |
visit(All)
method, if it
implements the nested Visitor interface.Returns: an Iterator over the branch predicates
Returns: true if all branch predicates return true, false otherwise