Package org.geotools.util.factory
Class Hints.OptionKey
- Object
-
- RenderingHints.Key
-
- Hints.Key
-
- OptionKey
-
- Enclosing class:
- Hints
public static final class Hints.OptionKey extends Hints.Key
Key that allows the choice of several options. You can use"*"as a wild card to indicate that undocumented options may be supported (but there is no assurances -Hints.DATUM_SHIFT_METHOD).- Since:
- 2.4
- Author:
- Jody Garnett
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getOptions()Returns the set of available options.booleanisCompatibleValue(Object value)Returnstrueif the specified object is one of the valid options.-
Methods inherited from class Hints.Key
getValueClass, toString
-
Methods inherited from class RenderingHints.Key
equals, hashCode, intKey
-
-
-
-
Constructor Detail
-
OptionKey
public OptionKey(String... alternatives)
Creates a new key for a configuration option.- Parameters:
alternatives- The available options.
-
-
Method Detail
-
getOptions
public Set<String> getOptions()
Returns the set of available options.- Returns:
- The available options.
-
isCompatibleValue
public boolean isCompatibleValue(Object value)
Returnstrueif the specified object is one of the valid options. If the options specified at construction time contains the"*"wildcard, then this method returnstruefor everyStringobject.- Overrides:
isCompatibleValuein classHints.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),Hints.IntegerKey.isCompatibleValue(java.lang.Object),isCompatibleValue(java.lang.Object)
-
-