|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.rmi.value.BaseNonStreamValue
org.apache.jackrabbit.rmi.value.DoubleValue
public class DoubleValue
The DoubleValue
class implements the committed value state for
Double values as a part of the State design pattern (Gof) used by this
package.
SerialValue
,
Serialized FormConstructor Summary | |
---|---|
protected |
DoubleValue(double value)
Creates an instance for the given double value . |
protected |
DoubleValue(String value)
Creates an instance for the given string representation of a double. |
Method Summary | |
---|---|
Calendar |
getDate()
Returns a Calendar instance interpreting the double as the
time in milliseconds since the epoch (1.1.1970, 0:00, UTC). |
double |
getDouble()
Returns the double value. |
long |
getLong()
Returns the value converted to a long. |
String |
getString()
Returns the double as a string converted by the Double.toString(double) . |
int |
getType()
Returns PropertyType.DOUBLE . |
protected static double |
toDouble(String value)
Returns the double value represented by the string value . |
Methods inherited from class org.apache.jackrabbit.rmi.value.BaseNonStreamValue |
---|
getBoolean, getStream, getValueFormatException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.jcr.Value |
---|
getBoolean, getStream |
Constructor Detail |
---|
protected DoubleValue(double value)
value
.
protected DoubleValue(String value) throws ValueFormatException
This implementation uses the Double.valueOf(String)
method
to convert the string to a double.
ValueFormatException
- if the string value
cannot be
parsed to double.Method Detail |
---|
protected static double toDouble(String value) throws ValueFormatException
value
.
ValueFormatException
- if the string value
cannot be
parsed to double.public int getType()
PropertyType.DOUBLE
.
getType
in interface Value
public Calendar getDate() throws ValueFormatException
Calendar
instance interpreting the double as the
time in milliseconds since the epoch (1.1.1970, 0:00, UTC).
getDate
in interface Value
getDate
in class BaseNonStreamValue
ValueFormatException
- If the value cannot be converted to a
Calendar
instance.public double getDouble()
getDouble
in interface Value
getDouble
in class BaseNonStreamValue
public String getString()
Double.toString(double)
.
getString
in interface Value
public long getLong()
getLong
in interface Value
getLong
in class BaseNonStreamValue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |