org.foray.fotree.axsl
Enum AxslValue

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

public enum AxslValue
extends Enum<AxslValue>

An enumeration of the hard-coded XSL-FO property values.


Enum Constant Summary
AUTHOR
          Constant indicating an "author" property value.
KEYWORDS
          Constant indicating a "keywords" property value.
SUBJECT
          Constant indicating a "subject" property value.
TITLE
          Constant indicating a "title" property value.
 
Method Summary
 String toXslFo()
          Returns the XSL-FO name for this value.
static AxslValue valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AxslValue[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
static AxslValue xslValueOf(String xslName)
          Similar to the Java 1.5 Enum valueOf(String) method, but operates on the XSL-FO value 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

AUTHOR

public static final AxslValue AUTHOR
Constant indicating an "author" property value.


KEYWORDS

public static final AxslValue KEYWORDS
Constant indicating a "keywords" property value.


SUBJECT

public static final AxslValue SUBJECT
Constant indicating a "subject" property value.


TITLE

public static final AxslValue TITLE
Constant indicating a "title" property value.

Method Detail

values

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

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

valueOf

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

toXslFo

public String toXslFo()
Returns the XSL-FO name for this value. For example, the enumeration AUTHOR converts to the XSL-FO name "author".

Returns:
The XSL-FO name for the value enumeration.

xslValueOf

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

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


Copyright © 2017. All rights reserved.