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