org.geotoolkit.factory
Class Hints.OptionKey

Object
  extended by RenderingHints.Key
      extended by Hints.Key
          extended by Hints.OptionKey
All Implemented Interfaces:
Serializable
Enclosing class:
Hints

@Immutable
public static final class Hints.OptionKey
extends Hints.Key

Key that allows the choice of several options. The special value "*" can be used as a wildcard to indicate that undocumented options may be supported (but there is no assurances - see Hints.DATUM_SHIFT_METHOD for example).

Since:
2.4
Version:
3.00
Author:
Jody Garnett (Refractions)
See Also:
Serialized Form
Module:
utility/geotk-utility (download)    View source code for this class

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

Constructor Detail

Hints.OptionKey

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


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.