Modifier and Type | Field and Description |
---|---|
private boolean |
allowSubclass |
private Class<?> |
clazz |
Constructor and Description |
---|
InstanceOfFilter(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 Class<?> clazz
private final boolean allowSubclass
public InstanceOfFilter(Class<?> clazz, boolean allowSubclass)
clazz
- The class to match againstallowSubclass
- If subclasses to the specified class should
be accepted (TRUE) or denied (FALSE)