org.apache.commons.collections.functors
public final class InstanceofPredicate extends Object implements Predicate, Serializable
Since: Commons Collections 3.0
Version: $Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
| 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.
|
getInstance if you want that.
Parameters: type the type to check for
Parameters: object the input object
Returns: true if input is of stored type
Parameters: type the type to check for, may not be null
Returns: the predicate
Throws: IllegalArgumentException if the class is null
Returns: the type
Since: Commons Collections 3.1