| java.lang.Object org.apache.commons.collections.functors.InstanceofPredicate
InstanceofPredicate | final public class InstanceofPredicate implements Predicate,Serializable(Code) | | Predicate implementation that returns true if the input is an instanceof
the type stored in this predicate.
since: Commons Collections 3.0 version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $ author: Stephen Colebourne |
Method Summary | |
public boolean | evaluate(Object object) Evaluates the predicate returning true if the input object is of the correct type. | public static Predicate | getInstance(Class type) Factory to create the identity predicate. | public Class | getType() Gets the type to compare to. |
InstanceofPredicate | public InstanceofPredicate(Class type)(Code) | | Constructor that performs no validation.
Use getInstance if you want that.
Parameters: type - the type to check for |
evaluate | public boolean evaluate(Object object)(Code) | | Evaluates the predicate returning true if the input object is of the correct type.
Parameters: object - the input object true if input is of stored type |
getInstance | public static Predicate getInstance(Class type)(Code) | | Factory to create the identity predicate.
Parameters: type - the type to check for, may not be null the predicate throws: IllegalArgumentException - if the class is null |
getType | public Class getType()(Code) | | Gets the type to compare to.
the type since: Commons Collections 3.1 |
|
|