public final class IdentityPredicate<T> extends Object implements Predicate<T>, Serializable
Constructor and Description |
---|
IdentityPredicate(T object)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(T object)
Evaluates the predicate returning true if the input object is identical to
the stored object.
|
T |
getValue()
Gets the value.
|
static <T> Predicate<T> |
identityPredicate(T object)
Factory to create the identity predicate.
|
public IdentityPredicate(T object)
identityPredicate
if you want that.object
- the object to compare topublic static <T> Predicate<T> identityPredicate(T object)
T
- the type that the predicate queriesobject
- the object to compare topublic boolean evaluate(T object)
Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.