org.qtitools.qti.value
Class IdentifierValue

java.lang.Object
  extended by org.qtitools.qti.value.SingleValue
      extended by org.qtitools.qti.value.IdentifierValue
All Implemented Interfaces:
java.io.Serializable, Value

public class IdentifierValue
extends SingleValue

Implementation of BaseType identifier value.

Identifier starts with letter or underscore(_) and contains only letters, underscores(_), digits, hyphens(-) and periods(.).

CombiningChars and Extenders are not currently supported!

This class is not mutable and cannot contain NULL value.

Cardinality of this class is always single and BaseType is always identifier.

Author:
Jiri Kajaba
See Also:
Cardinality, BaseType, Serialized Form

Constructor Summary
IdentifierValue(java.lang.String value)
          Constructs IdentifierValue from given String representation.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 BaseType getBaseType()
          Returns baseType of this value.
 int hashCode()
           
static java.lang.String parseIdentifier(java.lang.String value)
          Parses the String argument as A identifier.
 java.lang.String stringValue()
          Returns the value of this IdentifierValue as A String.
 java.lang.String toString()
           
 
Methods inherited from class org.qtitools.qti.value.SingleValue
getCardinality, isNull
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdentifierValue

public IdentifierValue(java.lang.String value)
                throws QTIParseException
Constructs IdentifierValue from given String representation.

Parameters:
value - String representation of IdentifierValue
Throws:
QTIParseException - if String representation of IdentifierValue is not valid
Method Detail

getBaseType

public BaseType getBaseType()
Description copied from interface: Value
Returns baseType of this value.

If value is NULL or record cardinality returns null.

Returns:
baseType of this value

stringValue

public java.lang.String stringValue()
Returns the value of this IdentifierValue as A String.

Returns:
the value of this IdentifierValue as A String

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

parseIdentifier

public static java.lang.String parseIdentifier(java.lang.String value)
                                        throws QTIParseException
Parses the String argument as A identifier.

Parameters:
value - String representation of identifier
Returns:
parsed identifier
Throws:
QTIParseException - if String representation of identifier is not valid


Copyright © 2009. All Rights Reserved.