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 TypeMethodDescriptionbooleanisCompatibleValue(Object value) Returnstrueif the specified object is a valid value for this key.Methods inherited from class Hints.Key
getValueClass, toStringMethods 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
Returnstrueif 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
Classassignable to the expected value class. - An array of
Classobjects assignable to the expected value class.
- Overrides:
isCompatibleValuein classHints.Key- Parameters:
value- The object to test for validity.- Returns:
trueif the value is valid;falseotherwise.- See Also:
-