|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.functors.IdentityPredicate<T>
public final class IdentityPredicate<T>
Predicate implementation that returns true if the input is the same object as the one stored in this predicate.
Constructor Summary | |
---|---|
IdentityPredicate(T object)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning true if the input object is identical to the stored object. |
|
static
|
getInstance(T object)
Factory to create the identity predicate. |
|
T |
getValue()
Gets the value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IdentityPredicate(T object)
getInstance
if you want that.
object
- the object to compare toMethod Detail |
---|
public static <T> Predicate<T> getInstance(T object)
object
- the object to compare to
IllegalArgumentException
- if the predicate is nullpublic boolean evaluate(T object)
evaluate
in interface Predicate<T>
object
- the input object
public T getValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |