Package org.geotools.util.factory
Class Hints.DoubleKey
Object
RenderingHints.Key
Hints.Key
DoubleKey
- Enclosing class:
- Hints
A hint used to capture a configuration setting as double. A default value is provided and may be checked with
getDefault()
.- Since:
- 2.6
- Author:
- Jody Garnett
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleKey
(double number) Creates a new key with the specified default value. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the default value.boolean
isCompatibleValue
(Object value) Returnstrue
if the specified object is a valid integer.double
Returns the value from the specified hints as a double.Methods inherited from class Hints.Key
getValueClass, toString
Methods inherited from class RenderingHints.Key
equals, hashCode, intKey
-
Constructor Details
-
DoubleKey
public DoubleKey(double number) Creates a new key with the specified default value.- Parameters:
number
- The default value.
-
-
Method Details
-
getDefault
public double getDefault()Returns the default value.- Returns:
- The default value.
-
toValue
Returns the value from the specified hints as a double. If no value were found for this key, then this method returns the default value.- Parameters:
hints
- The map where to fetch the hint value, ornull
.- Returns:
- The hint value as a double, or the default value if not hint was explicitly set.
-
isCompatibleValue
Returnstrue
if the specified object is a valid integer.- Overrides:
isCompatibleValue
in classHints.Key
- Parameters:
value
- The object to test for validity.- Returns:
true
if the value is valid;false
otherwise.- See Also:
-