public class InstanceOfFilter<T> extends java.lang.Object implements Filter<T>
Modifier and Type | Field and Description |
---|---|
private boolean |
allowSubclass |
private java.lang.Class<?> |
clazz |
Constructor and Description |
---|
InstanceOfFilter(java.lang.Class<?> clazz,
boolean allowSubclass)
Create a new filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(T object)
Evaluate if the given object should pass the filter or not.
|
private final java.lang.Class<?> clazz
private final boolean allowSubclass
public InstanceOfFilter(java.lang.Class<?> clazz, boolean allowSubclass)
clazz
- The class to match againstallowSubclass
- If subclasses to the specified class should
be accepted (TRUE) or denied (FALSE)