|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.rmi.value.BaseNonStreamValue org.apache.jackrabbit.rmi.value.LongValue
public class LongValue
The LongValue
class implements the committed value state for
Long values as a part of the State design pattern (Gof) used by this
package.
SerialValue
,
Serialized FormConstructor Summary | |
---|---|
protected |
LongValue(long value)
Creates an instance for the given long value . |
protected |
LongValue(String value)
Creates an instance for the given string representation of a long. |
Method Summary | |
---|---|
Calendar |
getDate()
Returns a Calendar instance interpreting the long as the
time in milliseconds since the epoch (1.1.1970, 0:00, UTC). |
double |
getDouble()
Returns the value converted to a double. |
long |
getLong()
Returns the double value. |
String |
getString()
Returns the long as a string converted by the Long.toString(long) . |
int |
getType()
Returns PropertyType.LONG . |
protected static long |
toLong(String value)
Returns the long 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 LongValue(long value)
value
.
protected LongValue(String value) throws ValueFormatException
This implementation uses the Long.valueOf(String)
method
to convert the string to a long.
ValueFormatException
- if the string value
cannot be
parsed to long.Method Detail |
---|
protected static long toLong(String value) throws ValueFormatException
value
.
ValueFormatException
- if the string value
cannot be
parsed to long.public int getType()
PropertyType.LONG
.
getType
in interface Value
public Calendar getDate() throws ValueFormatException
Calendar
instance interpreting the long 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 long getLong()
getLong
in interface Value
getLong
in class BaseNonStreamValue
public String getString()
Long.toString(long)
.
getString
in interface Value
public double getDouble()
getDouble
in interface Value
getDouble
in class BaseNonStreamValue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |