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 TypeMethodDescriptiondoubleReturns the default value.booleanisCompatibleValue(Object value) Returnstrueif the specified object is a valid integer.doubleReturns the value from the specified hints as a double.Methods inherited from class Hints.Key
getValueClass, toStringMethods 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
Returnstrueif the specified object is a valid integer.- Overrides:
isCompatibleValuein classHints.Key- Parameters:
value- The object to test for validity.- Returns:
trueif the value is valid;falseotherwise.- See Also:
-