| net.sf.jga.fn.logical.Any
All known Subclasses: net.sf.jga.fn.AdaptorVisitor,
Any | public class Any extends UnaryPredicate (Code) | | Unary Predicate that returns true when one of 0 or more branch predicates
returns true. When the collection of branch predicates is empty, an Any
predicate will return false (somewhat arbitrarily). This predicate will
short circuit: once one of the branches returns true, 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 © 2003-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | Any() Builds the Any predicate with an empty default collection of branch
predicates. | public | Any(Collection<UnaryFunctor<T, Boolean>> branches) Builds the Any predicate with the given collection of branch predicates.
More predicates may be added to the collection after construction. |
serialVersionUID | final static long serialVersionUID(Code) | | |
Any | public Any()(Code) | | Builds the Any 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.
|
Any | public Any(Collection<UnaryFunctor<T, Boolean>> branches)(Code) | | Builds the Any 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(Any) method, if it
implements the nested Visitor interface.
|
fn | public Boolean fn(T x)(Code) | | Given arguments x, returns true if at least one branch predicate
returns true when given x. Returns false when there are no branch
predicates.
true if one branch predicates return true, false otherwise |
|
|