org.qtitools.qti.value
Enum ParamType

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

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

This class describes paramType of A param. Supported paramTypes are:

DATA

REF

Author:
Jiri Kajaba

Enum Constant Summary
DATA
          DATA type.
REF
          REF type.
 
Field Summary
static java.lang.String CLASS_TAG
          Name of this class in xml schema.
 
Method Summary
static ParamType[] intersection(ParamType[] firstSet, ParamType[] secondSet)
          Returns intersection of two given types sets (order is not important).
 boolean isData()
          Returns true if this paramType is DATA; false otherwise.
 boolean isRef()
          Returns true if this paramType is REF; false otherwise.
static ParamType parseParamType(java.lang.String paramType)
          Returns parsed ParamType from given String.
 java.lang.String toString()
           
static ParamType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ParamType[] 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

DATA

public static final ParamType DATA
DATA type.


REF

public static final ParamType REF
REF type.

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

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

valueOf

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

isData

public boolean isData()
Returns true if this paramType is DATA; false otherwise.

Returns:
true if this paramType is DATA; false otherwise

isRef

public boolean isRef()
Returns true if this paramType is REF; false otherwise.

Returns:
true if this paramType is REF; false otherwise

toString

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

parseParamType

public static ParamType parseParamType(java.lang.String paramType)
                                throws QTIParseException
Returns parsed ParamType from given String.

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

intersection

public static ParamType[] intersection(ParamType[] firstSet,
                                       ParamType[] secondSet)
Returns intersection of two given types sets (order is not important).

Parameters:
firstSet - first set of types
secondSet - second set of types
Returns:
intersection of two given types sets


Copyright © 2009. All Rights Reserved.