public final class InstanceofPredicate extends java.lang.Object implements Predicate<java.lang.Object>, java.io.Serializable
Constructor and Description |
---|
InstanceofPredicate(java.lang.Class<?> type)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(java.lang.Object object)
Evaluates the predicate returning true if the input object is of the correct type.
|
java.lang.Class<?> |
getType()
Gets the type to compare to.
|
static Predicate<java.lang.Object> |
instanceOfPredicate(java.lang.Class<?> type)
Factory to create the identity predicate.
|
public InstanceofPredicate(java.lang.Class<?> type)
instanceOfPredicate
if you want that.type
- the type to check forpublic static Predicate<java.lang.Object> instanceOfPredicate(java.lang.Class<?> type)
type
- the type to check for, may not be nulljava.lang.NullPointerException
- if the class is nullpublic boolean evaluate(java.lang.Object object)
public java.lang.Class<?> getType()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"