Package org.geotools.util.factory
Class Hints.ClassKey
Object
RenderingHints.Key
Hints.Key
ClassKey
- Enclosing class:
- Hints
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isCompatibleValue
(Object value) Returnstrue
if the specified object is a valid value for this key.Methods inherited from class Hints.Key
getValueClass, toString
Methods inherited from class RenderingHints.Key
equals, hashCode, intKey
-
Constructor Details
-
ClassKey
Constructs a new key for values of the given class.- Parameters:
classe
- The base class for all valid values.
-
-
Method Details
-
isCompatibleValue
Returnstrue
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 classHints.Key
- Parameters:
value
- The object to test for validity.- Returns:
true
if the value is valid;false
otherwise.- See Also:
-