org.qtitools.qti.value
Enum Orientation

java.lang.Object
  extended by java.lang.Enum<Orientation>
      extended by org.qtitools.qti.value.Orientation
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Orientation>

public enum Orientation
extends java.lang.Enum<Orientation>

This class describes orientation. Supported cardinalities are:

horizontal

vertical

Author:
Jiri Kajaba

Enum Constant Summary
HORIZONTAL
          horizontal
VERTICAL
          vertical
 
Field Summary
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
 
Method Summary
 boolean isHorizontal()
          Returns true if this orientation is horizontal; false otherwise.
 boolean isVertical()
          Returns true if this orientation is vertical; false otherwise.
static Orientation parseOrientation(java.lang.String orientation)
          Returns parsed Orientation from given String.
 java.lang.String toString()
           
static Orientation valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Orientation[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HORIZONTAL

public static final Orientation HORIZONTAL
horizontal


VERTICAL

public static final Orientation VERTICAL
vertical

Field Detail

CLASS_TAG

public static final java.lang.String CLASS_TAG
Name of this class in xml schema.

See Also:
Constant Field Values
Method Detail

values

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

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

valueOf

public static Orientation valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

isHorizontal

public boolean isHorizontal()
Returns true if this orientation is horizontal; false otherwise.

Returns:
true if this orientation is horizontal; false otherwise

isVertical

public boolean isVertical()
Returns true if this orientation is vertical; false otherwise.

Returns:
true if this orientation is vertical; false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<Orientation>

parseOrientation

public static Orientation parseOrientation(java.lang.String orientation)
                                    throws QTIParseException
Returns parsed Orientation from given String.

Parameters:
orientation - String representation of Orientation
Returns:
parsed Orientation from given String
Throws:
QTIParseException - if given String is not valid Orientation


Copyright © 2009. All Rights Reserved.