org.apache.commons.collections.functors
public final class InstanceofPredicate extends Object implements Predicate, Serializable
Since: Commons Collections 3.0
Version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
| 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