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