|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections.functors.InstanceofPredicate
public final class InstanceofPredicate
Predicate implementation that returns true if the input is an instanceof the type stored in this predicate.
| Constructor Summary | |
|---|---|
InstanceofPredicate(java.lang.Class type)
Constructor that performs no validation. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InstanceofPredicate(java.lang.Class type)
getInstance if you want that.
type - the type to check for| Method Detail |
|---|
public static Predicate getInstance(java.lang.Class type)
type - the type to check for, may not be null
java.lang.IllegalArgumentException - if the class is nullpublic boolean evaluate(java.lang.Object object)
evaluate in interface Predicateobject - the input object
public java.lang.Class getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||