A - the argument type.public final class UnaryPredicateUnaryFunction<A> extends Object implements UnaryFunction<A,Boolean>, Serializable
UnaryPredicate
to the
UnaryFunction interface.
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if the
underlying predicate is. Attempts to serialize
an instance whose delegate is not
Serializable will result in an exception.| Constructor and Description |
|---|
UnaryPredicateUnaryFunction(UnaryPredicate<? super A> predicate)
Create a new UnaryPredicateUnaryFunction.
|
| Modifier and Type | Method and Description |
|---|---|
static <A> UnaryPredicateUnaryFunction<A> |
adapt(UnaryPredicate<? super A> predicate)
Adapt a UnaryPredicate to the UnaryFunction interface.
|
boolean |
equals(Object that) |
boolean |
equals(UnaryPredicateUnaryFunction<?> that)
Learn whether another UnaryPredicateUnaryFunction is equal to this.
|
Boolean |
evaluate(A obj)
Evaluate this function.
|
int |
hashCode() |
String |
toString() |
public UnaryPredicateUnaryFunction(UnaryPredicate<? super A> predicate)
predicate - to adaptpublic Boolean evaluate(A obj)
Boolean.TRUE (Boolean.FALSE)
when the test method of my underlying
predicate returns true (false).evaluate in interface UnaryFunction<A,Boolean>obj - the A object to evaluatenull Boolean instancepublic boolean equals(UnaryPredicateUnaryFunction<?> that)
that - UnaryPredicateUnaryFunction to testpublic static <A> UnaryPredicateUnaryFunction<A> adapt(UnaryPredicate<? super A> predicate)
A - the argument type.predicate - to adaptCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.