org.geotoolkit.factory
Class Hints.FileKey

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

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

Key for hints to be specified as a File. The file may also be specified as a String object.

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

Constructor Summary
Hints.FileKey(boolean writable)
          Creates a new key for File value.
 
Method Summary
 boolean isCompatibleValue(Object value)
          Returns true if the specified object is a valid file or directory.
 
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.FileKey

public Hints.FileKey(boolean writable)
Creates a new key for File value.

Parameters:
writable - true if write operations need to be allowed.
Method Detail

isCompatibleValue

public boolean isCompatibleValue(Object value)
Returns true if the specified object is a valid file or directory. The check performed depends on the value of the writable argument given to the constructor:

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


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