Package org.geotools.util.factory
Class Hints.ClassKey
- Object
-
- RenderingHints.Key
-
- Hints.Key
-
- ClassKey
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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 Detail
-
ClassKey
public ClassKey(Class<?> classe)
Constructs a new key for values of the given class.- Parameters:
classe
- The base class for all valid values.
-
-
Method Detail
-
isCompatibleValue
public boolean isCompatibleValue(Object value)
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:
isCompatibleValue(java.lang.Object)
,Hints.FileKey.isCompatibleValue(java.lang.Object)
,Hints.IntegerKey.isCompatibleValue(java.lang.Object)
,Hints.OptionKey.isCompatibleValue(java.lang.Object)
-
-