Package org.geotools.util.factory
Class Hints.IntegerKey
- Object
- 
- RenderingHints.Key
- 
- Hints.Key
- 
- IntegerKey
 
 
 
- 
- Enclosing class:
- Hints
 
 public static final class Hints.IntegerKey extends Hints.Key A hint used to capture a configuration setting as an integer. A default value is provided and may be checked withgetDefault().- Since:
- 2.4
- Author:
- Jody Garnett
 
- 
- 
Constructor SummaryConstructors Constructor Description IntegerKey(int number)Creates a new key with the specified default value.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDefault()Returns the default value.booleanisCompatibleValue(Object value)Returnstrueif the specified object is a valid integer.inttoValue(Hints hints)Returns the value from the specified hints as an integer.- 
Methods inherited from class Hints.KeygetValueClass, toString
 - 
Methods inherited from class RenderingHints.Keyequals, hashCode, intKey
 
- 
 
- 
- 
- 
Method Detail- 
getDefaultpublic int getDefault() Returns the default value.- Returns:
- The default value.
 
 - 
toValuepublic int toValue(Hints hints) Returns the value from the specified hints as an integer. 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, or- null.
- Returns:
- The hint value as an integer, or the default value if not hint was explicitly set.
 
 - 
isCompatibleValuepublic boolean isCompatibleValue(Object value) Returnstrueif the specified object is a valid integer.- Overrides:
- isCompatibleValuein class- Hints.Key
- Parameters:
- value- The object to test for validity.
- Returns:
- trueif the value is valid;- falseotherwise.
- See Also:
- Hints.ClassKey.isCompatibleValue(java.lang.Object),- Hints.FileKey.isCompatibleValue(java.lang.Object),- isCompatibleValue(java.lang.Object),- Hints.OptionKey.isCompatibleValue(java.lang.Object)
 
 
- 
 
-