|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.qtitools.qti.value.SingleValue
org.qtitools.qti.value.NumberValue
org.qtitools.qti.value.FloatValue
public class FloatValue
Implementation of BaseType float value.
Float data type is defined as the IEEE double-precision 64-bit floating point type.
Example values: 1, 3.14, +3.14, -3.14, 3E+08, +3E+08, -3E+08, 3E-08, +3E-08, -3E-08.
See XML for more more accurately definition.
This class is not mutable and cannot contain NULL value.
Cardinality of this class is always single and BaseType is always float.
Cardinality,
BaseType,
Serialized Form| Constructor Summary | |
|---|---|
FloatValue(double value)
Constructs FloatValue from given double. |
|
FloatValue(java.lang.String value)
Constructs FloatValue from given String representation. |
|
| Method Summary | |
|---|---|
double |
doubleValue()
Returns the value of this NumberValue as A double. |
boolean |
equals(java.lang.Object object)
|
BaseType |
getBaseType()
Returns baseType of this value. |
int |
hashCode()
|
int |
intValue()
Returns the value of this NumberValue as A int. |
static double |
parseFloat(java.lang.String value)
Parses the String argument as A double. |
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 |
|---|
public FloatValue(double value)
FloatValue from given double.
value - double
public FloatValue(java.lang.String value)
throws QTIParseException
FloatValue from given String representation.
value - String representation of FloatValue
QTIParseException - if String representation of FloatValue is not valid| Method Detail |
|---|
public BaseType getBaseType()
ValueIf value is NULL or record cardinality returns null.
public int intValue()
NumberValueNumberValue as A int.
intValue in class NumberValueNumberValue as A intpublic double doubleValue()
NumberValueNumberValue as A double.
doubleValue in class NumberValueNumberValue as A doublepublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public static double parseFloat(java.lang.String value)
throws QTIParseException
String argument as A double.
value - String representation of double
double
QTIParseException - if String representation of double is not valid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||