org.geotools.factory
Class Hints.OptionKey

java.lang.Object
  extended by java.awt.RenderingHints.Key
      extended by org.geotools.factory.Hints.Key
          extended by org.geotools.factory.Hints.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
Version:
$Id: Hints.java 35735 2010-06-19 15:17:07Z aaime $
Author:
Jody Garnett

Constructor Summary
Hints.OptionKey(java.lang.String... alternatives)
          Creates a new key for a configuration option.
 
Method Summary
 java.util.Set<java.lang.String> getOptions()
          Returns the set of available options.
 boolean isCompatibleValue(java.lang.Object value)
          Returns true if the specified object is one of the valid options.
 
Methods inherited from class org.geotools.factory.Hints.Key
getValueClass, toString
 
Methods inherited from class java.awt.RenderingHints.Key
equals, hashCode, intKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Hints.OptionKey

public Hints.OptionKey(java.lang.String... alternatives)
Creates a new key for a configuration option.

Parameters:
alternatives - The available options.
Method Detail

getOptions

public java.util.Set<java.lang.String> getOptions()
Returns the set of available options.

Returns:
The available options.

isCompatibleValue

public boolean isCompatibleValue(java.lang.Object value)
Returns true if the specified object is one of the valid options. If the options specified at construction time contains the "*" wildcard, then this method returns true for every String object.

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(java.lang.Object), Hints.FileKey.isCompatibleValue(java.lang.Object), Hints.IntegerKey.isCompatibleValue(java.lang.Object), isCompatibleValue(java.lang.Object)


Copyright © 1996-2010 Geotools. All Rights Reserved.