org.geotoolkit.util.converter
Interface ClassFilter

All Known Implementing Classes:
BaseClassFilter

public interface ClassFilter

A filter to be given as parameter to methods that apply filtering on Class instances. An example of such method is LineFormat.getElementType(ClassFilter).

Since:
3.00
Version:
3.00
Author:
Martin Desruisseaux (Geomatys)
Module:
utility/geotk-utility (download)    View source code for this class

Field Summary
static ClassFilter CHAR_SEQUENCE
          Returns a filter accepting only classes assignable to CharSequence.
static ClassFilter NUMBER
          Returns a filter accepting only classes assignable to Number.
 
Method Summary
 boolean accepts(Class<?> type)
          Returns true if the given class can be accepted.
 ClassFilter negate()
          Returns a filter which is the negation of this filter.
 

Field Detail

NUMBER

static final ClassFilter NUMBER
Returns a filter accepting only classes assignable to Number.


CHAR_SEQUENCE

static final ClassFilter CHAR_SEQUENCE
Returns a filter accepting only classes assignable to CharSequence.

Method Detail

accepts

boolean accepts(Class<?> type)
Returns true if the given class can be accepted.

Parameters:
type - The class to test.
Returns:
true if the given class can be accepted.

negate

ClassFilter negate()
Returns a filter which is the negation of this filter. For any type t, the following condition shall hold:
negate().accepts(t) == !accepts(t)

Returns:
The negation of this filter.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.