org.geotoolkit.util.converter
Class BaseClassFilter
Object
BaseClassFilter
- All Implemented Interfaces:
- Serializable, ClassFilter
public class BaseClassFilter
- extends Object
- implements ClassFilter, Serializable
A Class Filter implementation accepting only classes that are
assignable to a given base class.
- Since:
- 3.00
- Version:
- 3.00
- Author:
- Martin Desruisseaux (Geomatys)
- See Also:
- Serialized Form
- Module:
|
Field Summary |
protected Class<?> |
base
The base class. |
|
Method Summary |
boolean |
accepts(Class<?> type)
Returns true if the given type is assignable to the base class. |
ClassFilter |
negate()
Returns a filter which is the negation of this filter. |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
base
protected final Class<?> base
- The base class.
BaseClassFilter
public BaseClassFilter(Class<?> base)
- Creates a new class filter for the given base.
- Parameters:
base - The base class.
accepts
public boolean accepts(Class<?> type)
- Returns
true if the given type is assignable to the base class.
- Specified by:
accepts in interface ClassFilter
- Parameters:
type - The class to test.
- Returns:
true if the given class can be accepted.
negate
public ClassFilter negate()
- Returns a filter which is the negation of this filter. With the default implementation
of
accepts(java.lang.Class>) method, it is a filter accepting any class that are not
assignable to the base class.
- Specified by:
negate in interface ClassFilter
- Returns:
- The negation of this filter.
Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.