java.io.Serializable, Predicatepublic final class InstanceofPredicate extends java.lang.Object implements Predicate, java.io.Serializable
| Constructor | Description |
|---|---|
InstanceofPredicate(java.lang.Class type) |
Constructor that performs no validation.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
evaluate(java.lang.Object object) |
Evaluates the predicate returning true if the input object is of the correct type.
|
static Predicate |
getInstance(java.lang.Class type) |
Factory to create the identity predicate.
|
java.lang.Class |
getType() |
Gets the type to compare to.
|
public InstanceofPredicate(java.lang.Class type)
getInstance if you want that.type - the type to check forpublic static Predicate getInstance(java.lang.Class type)
type - the type to check for, may not be nulljava.lang.IllegalArgumentException - if the class is nullpublic boolean evaluate(java.lang.Object object)
public java.lang.Class getType()
Copyright © 2001-2018 Apache Software Foundation. All Rights Reserved.