org.geotoolkit.factory
Class Hints.IntegerKey
Object
RenderingHints.Key
Hints.Key
Hints.IntegerKey
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- Hints
@Immutable
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 with getDefault().
- Since:
- 2.4
- Version:
- 3.00
- Author:
- Jody Garnett (Refractions)
- See Also:
- Serialized Form
- Module:
|
Constructor Summary |
Hints.IntegerKey(int number)
Creates a new key with the specified default value. |
|
Method Summary |
int |
getDefault()
Returns the default value. |
boolean |
isCompatibleValue(Object value)
Returns true if the specified object is a valid integer. |
int |
toValue(Hints hints)
Returns the value from the specified hints as an integer. |
Hints.IntegerKey
public Hints.IntegerKey(int number)
- Creates a new key with the specified default value.
- Parameters:
number - The default value.
getDefault
public int getDefault()
- Returns the default value.
- Returns:
- The default value.
toValue
public 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.
isCompatibleValue
public boolean isCompatibleValue(Object value)
- Returns
true if the specified object is a valid integer.
- Overrides:
isCompatibleValue in class Hints.Key
- Parameters:
value - The object to test for validity.
- Returns:
true if the value is valid; false otherwise.- See Also:
Hints.ClassKey.isCompatibleValue(Object),
Hints.FileKey.isCompatibleValue(Object),
isCompatibleValue(Object),
Hints.OptionKey.isCompatibleValue(Object)
Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.