de.smartics.properties.config.transfer.filesystem
Enum PropertiesFormat

Package class diagram package PropertiesFormat
java.lang.Object
  extended by java.lang.Enum<PropertiesFormat>
      extended by de.smartics.properties.config.transfer.filesystem.PropertiesFormat
All Implemented Interfaces:
Serializable, Comparable< PropertiesFormat>

public enum PropertiesFormat
     
     
extends Enum< PropertiesFormat>

An enumeration of valid properties formats.


Enum Constant Summary
NATIVE
          The native properties format.
XML
          The XML format defined by the Properties implementation.
 
Method Summary
 String adjustPath(String path)
          Adjusts the file name in this way that it contains the correct extension for the given type.
static PropertiesFormat fromString(String type)
          Returns the properties format identifier by the case-insensitive identifier of the enumeration element.
static PropertiesFormat valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PropertiesFormat[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NATIVE

public static final PropertiesFormat NATIVE
The native properties format.


XML

public static final PropertiesFormat XML
The XML format defined by the Properties implementation.

Method Detail

values

public static PropertiesFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PropertiesFormat c : PropertiesFormat.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PropertiesFormat valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

adjustPath

public String adjustPath(String path)
Adjusts the file name in this way that it contains the correct extension for the given type.

Parameters:
path - the path to adjust if needed.
Returns:
the path with an extension that reflects the type.

fromString

public static PropertiesFormat fromString(String type)
Returns the properties format identifier by the case-insensitive identifier of the enumeration element.

Parameters:
type - the name of the enumeration element. The value is case insensitive.
Returns:
the enumeration element that corresponds with the given type name.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.