Uses of Interface
org.apache.commons.functor.UnaryPredicate
-
Packages that use UnaryPredicate Package Description org.apache.commons.functor.adapter Classes that adapt one functor interface to another.org.apache.commons.functor.core Commonly used functor implementations.org.apache.commons.functor.core.algorithm Various algorithm-esque functors.org.apache.commons.functor.core.collection Collection-based functors, algorithms and utilities.org.apache.commons.functor.core.comparator Comparator- andComparable-based functors, algorithms and utilities.org.apache.commons.functor.core.composite Functors composed of other functors.org.apache.commons.functor.generator Contains code related to Generators. -
-
Uses of UnaryPredicate in org.apache.commons.functor.adapter
Classes in org.apache.commons.functor.adapter that implement UnaryPredicate Modifier and Type Class Description classBinaryPredicateUnaryPredicate<A>Adapts a BinaryPredicate as a UnaryPredicate by sending the same argument to both sides of the BinaryPredicate.classLeftBoundPredicate<A>Adapts aBinaryPredicateto theUnaryPredicateinterface using a constant left-side argument.classPredicateUnaryPredicate<A>Adapts aPredicateto theUnaryPredicateinterface by ignoring the given argument.classRightBoundPredicate<A>Adapts aBinaryPredicateto theUnaryPredicateinterface using a constant left-side argument.classUnaryFunctionUnaryPredicate<A>Fields in org.apache.commons.functor.adapter declared as UnaryPredicate Modifier and Type Field Description private UnaryPredicate<java.lang.Object>BoundPredicate. predicateTheUnaryPredicateI'm wrapping.private UnaryPredicate<? super R>IgnoreLeftPredicate. predicateTheUnaryPredicateI'm wrapping.private UnaryPredicate<? super L>IgnoreRightPredicate. predicateTheUnaryPredicateI'm wrapping.private UnaryPredicate<? super A>UnaryPredicateUnaryFunction. predicateTheUnaryPredicateI'm wrapping.Methods in org.apache.commons.functor.adapter that return UnaryPredicate Modifier and Type Method Description static <A> UnaryPredicate<A>BinaryPredicateUnaryPredicate. adapt(BinaryPredicate<? super A,? super A> predicate)Adapt a BinaryFunction as a UnaryFunction.Methods in org.apache.commons.functor.adapter with parameters of type UnaryPredicate Modifier and Type Method Description static <L,R>
IgnoreLeftPredicate<L,R>IgnoreLeftPredicate. adapt(UnaryPredicate<? super R> predicate)Adapt a UnaryPredicate to an IgnoreLeftPredicate.static <L,R>
IgnoreRightPredicate<L,R>IgnoreRightPredicate. adapt(UnaryPredicate<? super L> predicate)Adapt a UnaryPredicate as an IgnoreRightPredicate.static <A> UnaryPredicateUnaryFunction<A>UnaryPredicateUnaryFunction. adapt(UnaryPredicate<? super A> predicate)Adapt a UnaryPredicate to the UnaryFunction interface.static <A> BoundPredicateBoundPredicate. bind(UnaryPredicate<? super A> predicate, A arg)Adapt the given, possibly-null,UnaryPredicateto thePredicateinterface by binding the specifiedObjectas a constant argument.Constructors in org.apache.commons.functor.adapter with parameters of type UnaryPredicate Constructor Description BoundPredicate(UnaryPredicate<? super A> predicate, A arg)Create a new BoundPredicate instance.IgnoreLeftPredicate(UnaryPredicate<? super R> predicate)Create a new IgnoreLeftPredicate.IgnoreRightPredicate(UnaryPredicate<? super L> predicate)Create a new IgnoreRightPredicate.UnaryPredicateUnaryFunction(UnaryPredicate<? super A> predicate)Create a new UnaryPredicateUnaryFunction. -
Uses of UnaryPredicate in org.apache.commons.functor.core
Classes in org.apache.commons.functor.core that implement UnaryPredicate Modifier and Type Class Description classConstant<T>Evaluatesto constant value.classIdentity<T>Evaluatesto its input argument.classIsNotNull<T>classIsNull<A>classLimitA predicate that returnstruethe first n times it is invoked.classOffsetA predicate that returnsfalsethe first n times it is invoked, andtruethereafter.Methods in org.apache.commons.functor.core that return UnaryPredicate Modifier and Type Method Description static <L,R>
UnaryPredicate<L>IsNotSame. as(R object)Get an IsNotSame UnaryPredicate.static <L,R>
UnaryPredicate<L>IsSame. as(R object)Get an IsSame UnaryPredicate.static <T> UnaryPredicate<T>IsInstance. of(java.lang.Class<?> clazz)Get an IsInstanceOf UnaryPredicate.static <L,R>
UnaryPredicate<L>IsEqual. to(R object)Get an IsEqual UnaryPredicate.static <L,R>
UnaryPredicate<L>IsNotEqual. to(R object)Get an IsNotEqual UnaryPredicate. -
Uses of UnaryPredicate in org.apache.commons.functor.core.algorithm
Fields in org.apache.commons.functor.core.algorithm declared as UnaryPredicate Modifier and Type Field Description private UnaryPredicate<? super T>FindWithinGenerator.FindProcedure. predThe adapted predicate.private UnaryPredicate<? super T>GeneratorContains.ContainsProcedure. predThe wrapped predicate.private UnaryPredicate<? super T>IndexOfInGenerator.IndexProcedure. predThe wrapped predicate.Methods in org.apache.commons.functor.core.algorithm with parameters of type UnaryPredicate Modifier and Type Method Description EFindWithinGenerator. evaluate(Generator<? extends E> left, UnaryPredicate<? super E> right)Evaluate this function.java.lang.NumberIndexOfInGenerator. evaluate(Generator<? extends T> left, UnaryPredicate<? super T> right)Evaluate this function.voidRemoveMatching. run(java.util.Iterator<? extends T> left, UnaryPredicate<? super T> right)Execute this procedure.voidRetainMatching. run(java.util.Iterator<? extends T> left, UnaryPredicate<? super T> right)Execute this procedure.booleanGeneratorContains. test(Generator<? extends T> left, UnaryPredicate<? super T> right)Evaluate this predicate.Constructors in org.apache.commons.functor.core.algorithm with parameters of type UnaryPredicate Constructor Description ContainsProcedure(UnaryPredicate<? super T> pred)Create a new ContainsProcedure.FindProcedure(UnaryPredicate<? super T> pred)Create a new FindProcedure.IndexProcedure(Generator<? extends T> generator, UnaryPredicate<? super T> pred)Create a new IndexProcedure. -
Uses of UnaryPredicate in org.apache.commons.functor.core.collection
Classes in org.apache.commons.functor.core.collection that implement UnaryPredicate Modifier and Type Class Description classIsEmpty<A>Fields in org.apache.commons.functor.core.collection declared as UnaryPredicate Modifier and Type Field Description private UnaryPredicate<? super T>FilteredIterator. predicateThe predicate used to test this Iterator elements.Methods in org.apache.commons.functor.core.collection that return UnaryPredicate Modifier and Type Method Description static <A> UnaryPredicate<A>IsElementOf. instance(java.lang.Object obj)Get an IsElementOf(collection|array) UnaryPredicate.Methods in org.apache.commons.functor.core.collection with parameters of type UnaryPredicate Modifier and Type Method Description static <T> java.util.Iterator<T>FilteredIterator. filter(java.util.Iterator<? extends T> iter, UnaryPredicate<? super T> pred)Get a filtered Iterator instance applyingpredtoiter.FilteredIterable<T>FilteredIterable. retain(UnaryPredicate<? super T> predicate)Retain only elements matchingpredicate.Constructors in org.apache.commons.functor.core.collection with parameters of type UnaryPredicate Constructor Description FilteredIterator(java.util.Iterator<? extends T> iterator, UnaryPredicate<? super T> predicate)Create a new FilteredIterator. -
Uses of UnaryPredicate in org.apache.commons.functor.core.comparator
Classes in org.apache.commons.functor.core.comparator that implement UnaryPredicate Modifier and Type Class Description classIsWithinRange<A extends java.lang.Comparable<A>>AUnaryPredicatethat tests whether aComparableobject is within a range.Methods in org.apache.commons.functor.core.comparator that return UnaryPredicate Modifier and Type Method Description static <T extends java.lang.Comparable<?>>
UnaryPredicate<T>IsEquivalent. instance(T right)Get an IsEquivalent instance that always compares toarg.static <T extends java.lang.Comparable<?>>
UnaryPredicate<T>IsGreaterThan. instance(T right)Get an IsGreaterThan UnaryPredicate.static <T extends java.lang.Comparable<?>>
UnaryPredicate<T>IsGreaterThanOrEqual. instance(T right)Get an IsGreaterThanOrEqual UnaryPredicate.static <T extends java.lang.Comparable<?>>
UnaryPredicate<T>IsLessThan. instance(T right)Get an IsLessThan UnaryPredicate.static <T extends java.lang.Comparable<?>>
UnaryPredicate<T>IsLessThanOrEqual. instance(T right)Get an IsLessThanOrEqual UnaryPredicate.static <T extends java.lang.Comparable<?>>
UnaryPredicate<T>IsNotEquivalent. instance(T right)Get an IsNotEquivalent UnaryPredicate. -
Uses of UnaryPredicate in org.apache.commons.functor.core.composite
Classes in org.apache.commons.functor.core.composite that implement UnaryPredicate Modifier and Type Class Description (package private) classBaseUnaryPredicateList<A>Abstract base class forUnaryPredicatescomposed of a list ofUnaryPredicates.classCompositeUnaryPredicate<A>AUnaryPredicaterepresenting the composition ofUnaryFunctions, "chaining" the output of one to the input of another.classConditionalUnaryPredicate<A>AUnaryPredicatesimiliar to Java's "ternary" or "conditional" operator (? :).classUnaryAnd<A>classUnaryNot<A>Teststo the logical inverse of some other predicate.classUnaryOr<A>Fields in org.apache.commons.functor.core.composite declared as UnaryPredicate Modifier and Type Field Description private UnaryPredicate<? super A>ConditionalUnaryPredicate. elsePredthe predicate executed if the condition is not satisfied.private UnaryPredicate<? super A>ConditionalUnaryFunction. ifPredthe condition to be evaluated.private UnaryPredicate<? super A>ConditionalUnaryPredicate. ifPredthe condition to be evaluated.private UnaryPredicate<? super A>ConditionalUnaryProcedure. ifPredthe condition to be evaluated.private UnaryPredicate<? super A>UnaryNot. predicateThe adapted predicate.private UnaryPredicate<? super A>ConditionalUnaryPredicate. thenPredthe predicate executed if the condition is satisfied.Fields in org.apache.commons.functor.core.composite with type parameters of type UnaryPredicate Modifier and Type Field Description private java.util.List<UnaryPredicate<? super A>>BaseUnaryPredicateList. listA list where storing the adapted predicates.Methods in org.apache.commons.functor.core.composite that return UnaryPredicate Modifier and Type Method Description static <A> UnaryPredicate<A>UnaryNot. not(UnaryPredicate<? super A> pred)Invert a UnaryPredicate.static <A> UnaryPredicate<A>Conditional. predicate(UnaryPredicate<? super A> q, UnaryPredicate<? super A> r, UnaryPredicate<? super A> s)Create a conditional UnaryPredicate.Methods in org.apache.commons.functor.core.composite that return types with arguments of type UnaryPredicate Modifier and Type Method Description protected java.util.List<UnaryPredicate<? super A>>BaseUnaryPredicateList. getUnaryPredicateList()Get the "live" list of containedUnaryPredicates.Methods in org.apache.commons.functor.core.composite with parameters of type UnaryPredicate Modifier and Type Method Description protected voidBaseUnaryPredicateList. addUnaryPredicate(UnaryPredicate<? super A> p)Add a UnaryPredicate to the list.UnaryAnd<A>UnaryAnd. and(UnaryPredicate<? super A> p)Fluently add a UnaryPredicate.static <A,T>
UnaryFunction<A,T>Conditional. function(UnaryPredicate<? super A> q, UnaryFunction<? super A,? extends T> r, UnaryFunction<? super A,? extends T> s)Create a conditional UnaryFunction.static <A> UnaryPredicate<A>UnaryNot. not(UnaryPredicate<? super A> pred)Invert a UnaryPredicate.UnaryOr<A>UnaryOr. or(UnaryPredicate<? super A> p)Fluently add a Predicate.static <A> CompositeUnaryPredicate<A>Composite. predicate(UnaryPredicate<? super A> pred)Create a composite UnaryPredicate.static <A,T>
CompositeUnaryPredicate<A>Composite. predicate(UnaryPredicate<? super T> predicate, UnaryFunction<? super A,? extends T> function)Create a composite UnaryPredicate.static <A> UnaryPredicate<A>Conditional. predicate(UnaryPredicate<? super A> q, UnaryPredicate<? super A> r, UnaryPredicate<? super A> s)Create a conditional UnaryPredicate.static <A> UnaryProcedure<A>Conditional. procedure(UnaryPredicate<? super A> q, UnaryProcedure<? super A> r)Create a guarded UnaryProcedure.static <A> UnaryProcedure<A>Conditional. procedure(UnaryPredicate<? super A> q, UnaryProcedure<? super A> r, UnaryProcedure<? super A> s)Create a conditional UnaryProcedure.Constructors in org.apache.commons.functor.core.composite with parameters of type UnaryPredicate Constructor Description BaseUnaryPredicateList(UnaryPredicate<? super A>... predicates)Create a new BaseUnaryPredicateList instance.CompositeUnaryPredicate(UnaryPredicate<? super A> predicate)Create a new CompositeUnaryPredicate.ConditionalUnaryFunction(UnaryPredicate<? super A> ifPred, UnaryFunction<? super A,? extends T> thenFunc, UnaryFunction<? super A,? extends T> elseFunc)Create a new ConditionalUnaryFunction.ConditionalUnaryPredicate(UnaryPredicate<? super A> ifPred, UnaryPredicate<? super A> thenPred, UnaryPredicate<? super A> elsePred)Create a new ConditionalUnaryPredicate.ConditionalUnaryProcedure(UnaryPredicate<? super A> ifPred, UnaryProcedure<? super A> thenProc)Create a new ConditionalUnaryProcedure.ConditionalUnaryProcedure(UnaryPredicate<? super A> ifPred, UnaryProcedure<? super A> thenProc, UnaryProcedure<? super A> elseProc)Create a new ConditionalUnaryProcedure.UnaryAnd(UnaryPredicate<? super A>... predicates)Create a new UnaryAnd instance.UnaryNot(UnaryPredicate<? super A> predicate)Create a new UnaryNot.UnaryOr(UnaryPredicate<? super A>... predicates)Create a new UnaryOr instance.Constructor parameters in org.apache.commons.functor.core.composite with type arguments of type UnaryPredicate Constructor Description BaseUnaryPredicateList(java.lang.Iterable<UnaryPredicate<? super A>> predicates)Create a new BaseUnaryPredicateList instance.UnaryAnd(java.lang.Iterable<UnaryPredicate<? super A>> predicates)Create a new UnaryAnd instance.UnaryOr(java.lang.Iterable<UnaryPredicate<? super A>> predicates)Create a new UnaryOr instance. -
Uses of UnaryPredicate in org.apache.commons.functor.generator
Fields in org.apache.commons.functor.generator declared as UnaryPredicate Modifier and Type Field Description private UnaryPredicate<? super E>FilteredGenerator. predThe wrapped generator.private UnaryPredicate<? super E>GenerateUntil. testThe condition has to verified in order to execute the generation.private UnaryPredicate<? super E>GenerateWhile. testThe condition has to verified in order to execute the generation.private UnaryPredicate<? super E>UntilGenerate. testThe condition has to verified in order to execute the generation.private UnaryPredicate<? super E>WhileGenerate. testThe condition has to verified in order to execute the generation.Constructors in org.apache.commons.functor.generator with parameters of type UnaryPredicate Constructor Description FilteredGenerator(Generator<? extends E> wrapped, UnaryPredicate<? super E> pred)Create a new FilteredGenerator.GenerateUntil(Generator<? extends E> wrapped, UnaryPredicate<? super E> test)Create a new GenerateUntil.GenerateWhile(Generator<? extends E> wrapped, UnaryPredicate<? super E> test)Create a new GenerateWhile.UntilGenerate(UnaryPredicate<? super E> test, Generator<? extends E> wrapped)Create a new UntilGenerate.WhileGenerate(UnaryPredicate<? super E> test, Generator<? extends E> wrapped)Create a new WhileGenerate.
-