| net.sf.jga.fn.logical.All
All known Subclasses: net.sf.jga.fn.AdaptorVisitor,
All | public class All extends UnaryPredicate (Code) | | Unary Predicate that returns true when each of 0 or more branch predicates
returns true. When the collection of branch predicates is empty, an All
predicate will return true (somewhat arbitrarily). This predicate will
short circuit: once one of the branches returns false, none of the
subsequent branches will be evaluated.
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-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | All() Builds the All predicate with an empty default collection of branch
predicates. | public | All(Collection<UnaryFunctor<T, Boolean>> branches) Builds the All predicate with the given collection of branch predicates.
More predicates may be added to the collection after construction. |
serialVersionUID | final static long serialVersionUID(Code) | | |
All | public All()(Code) | | Builds the All predicate with an empty default collection of branch
predicates. The default collection is a list, and branches will be
evaluated in the order they are added.
|
All | public All(Collection<UnaryFunctor<T, Boolean>> branches)(Code) | | Builds the All predicate with the given collection of branch predicates.
More predicates may be added to the collection after construction. The
order of evaluation of the branch predicates is determined by the
collection in use.
|
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(All) method, if it
implements the nested Visitor interface.
|
fn | public Boolean fn(T x)(Code) | | Given arguments x, returns true if all branch predicates return
true when given x. Also returns true when there are no branch
predicates.
true if all branch predicates return true, false otherwise |
|
|