org.geotools.factory
Class Hints.ClassKey
Object
RenderingHints.Key
Hints.Key
Hints.ClassKey
- Enclosing class:
- Hints
public static final class Hints.ClassKey
- extends Hints.Key
A key for value that may be specified either as instance of T, or as
Class<T>.
- Since:
- 2.4
- Author:
- Martin Desruisseaux
|
Constructor Summary |
Hints.ClassKey(Class<?> classe)
Constructs a new key for values of the given class. |
|
Method Summary |
boolean |
isCompatibleValue(Object value)
Returns true if the specified object is a valid value for
this key. |
Hints.ClassKey
public Hints.ClassKey(Class<?> classe)
- Constructs a new key for values of the given class.
- Parameters:
classe - The base class for all valid values.
isCompatibleValue
public boolean isCompatibleValue(Object value)
- Returns
true if the specified object is a valid value for
this key. This method checks if the specified value is non-null and
is one of the following:
- An instance of the expected value class.
- A
Class assignable to the expected value class.
- An array of
Class objects assignable to the expected value class.
- Overrides:
isCompatibleValue in class Hints.Key
- Parameters:
value - The object to test for validity.
- Returns:
true if the value is valid; false otherwise.- See Also:
isCompatibleValue(java.lang.Object),
Hints.FileKey.isCompatibleValue(java.lang.Object),
Hints.IntegerKey.isCompatibleValue(java.lang.Object),
Hints.OptionKey.isCompatibleValue(java.lang.Object)
Copyright © 1996-2013 Geotools. All Rights Reserved.