org.qtitools.qti.value
Class StringValue

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

public class StringValue
extends SingleValue

Implementation of BaseType string value.

See XML for more accurately definition.

This class is not mutable and cannot contain NULL value.

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

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

Constructor Summary
StringValue(java.lang.String value)
          Constructs StringValue from given String representation.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 BaseType getBaseType()
          Returns baseType of this value.
 int hashCode()
           
 java.lang.String stringValue()
          Returns the value of this StringValue 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

StringValue

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

Parameters:
value - String representation of StringValue
Throws:
QTIParseException - if String representation of StringValue 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 StringValue as A String.

Returns:
the value of this StringValue 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


Copyright © 2009. All Rights Reserved.