public static class Hints.Key extends RenderingHints.Key
Constructor and Description |
---|
Key(Class<?> classe)
Constructs a new key for values of the given class.
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
getValueClass()
Returns the expected class for values stored under this key.
|
boolean |
isCompatibleValue(Object value)
Returns
true if the specified object is a valid value for this key. |
String |
toString()
Returns a string representation of this key.
|
equals, hashCode, intKey
public Key(Class<?> classe)
classe
- The base class for all valid values.public Class<?> getValueClass()
public boolean isCompatibleValue(Object value)
true
if the specified object is a valid value for this key. The default
implementation checks if the specified value is an instance
of the value class.
Note that many hint keys defined in the Hints
class relax this rule and accept
Class
object assignable to the expected value class
as well.
isCompatibleValue
in class RenderingHints.Key
value
- The object to test for validity.true
if the value is valid; false
otherwise.Hints.ClassKey.isCompatibleValue(java.lang.Object)
,
Hints.FileKey.isCompatibleValue(java.lang.Object)
,
Hints.IntegerKey.isCompatibleValue(java.lang.Object)
,
Hints.OptionKey.isCompatibleValue(java.lang.Object)
Copyright © 1996–2019 Geotools. All rights reserved.