org.foray.fotree.axsl
Enum AxslProperty

java.lang.Object
  extended by java.lang.Enum<AxslProperty>
      extended by org.foray.fotree.axsl.AxslProperty
All Implemented Interfaces:
Serializable, Comparable<AxslProperty>, PropertyType

public enum AxslProperty
extends Enum<AxslProperty>
implements PropertyType

An enumeration for XSL-FO properties, that is, the identification of the property itself, as opposed to its value.


Enum Constant Summary
METADATA_KEY
          Constant indicating a "metadata-key" FO property.
 
Method Summary
 String toStringUnparsed()
          Returns the XSL-FO name for this instance.
static AxslProperty valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AxslProperty[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
static AxslProperty xslValueOf(String xslName)
          Similar to the Java 1.5 Enum valueOf(String) method, but operates on the XSL-FO name of the property instead of its enumerated name.
 
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

METADATA_KEY

public static final AxslProperty METADATA_KEY
Constant indicating a "metadata-key" FO property.

Method Detail

values

public static AxslProperty[] 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 (AxslProperty c : AxslProperty.values())
    System.out.println(c);

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

valueOf

public static AxslProperty 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

toStringUnparsed

public String toStringUnparsed()
Returns the XSL-FO name for this instance. For example, the enumeration METADATA_KEY converts to the XSL-FO name "metadata-key".

Specified by:
toStringUnparsed in interface PropertyType
Returns:
The XSL-FO name for the property enumeration.

xslValueOf

public static AxslProperty xslValueOf(String xslName)
Similar to the Java 1.5 Enum valueOf(String) method, but operates on the XSL-FO name of the property instead of its enumerated name. For example, for the XSL-FO property "metadata-key", the enum is METADATA_KEY. The Java 1.5 Enum valueOf(String) method would operate on the enum name "METADATA_KEY". This method instead operates on "metadata-key".

Parameters:
xslName - The name of the XSL-FO property for which the enumerated value is needed.
Returns:
The enumerated value for xslName.


Copyright © 2017. All rights reserved.