org.geotoolkit.factory
Class Hints.ClassKey

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

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

A key for value that may be specified either as instance of T, or as Class<T>.

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

Constructor Summary
Hints.ClassKey(Class<?> classe)
          Constructs a new key for values of the given class.
Hints.ClassKey(String className)
          Constructs a new key for values of the given class.
 
Method Summary
 boolean isCompatibleValue(Object value)
          Returns true if the specified object is a valid value for this key.
 
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.ClassKey

public Hints.ClassKey(Class<?> classe)
Constructs a new key for values of the given class.

Parameters:
classe - The base class for all valid values.

Hints.ClassKey

public Hints.ClassKey(String className)
Constructs a new key for values of the given class. The class is specified by name instead of a Class object. This allows to defer class loading until needed.

Parameters:
className - Name of base class for all valid values.
Since:
3.00
Method Detail

isCompatibleValue

public boolean isCompatibleValue(Object value)
Returns true if the specified object is a valid value for this key. This method checks if the specified value is non-null and is one of the following:

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


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