|
||||||||||
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.DateValue
public class DateValue
The DateValue
class implements the committed value state for
Date values as a part of the State design pattern (Gof) used by this
package.
SerialValue
,
Serialized FormConstructor Summary | |
---|---|
protected |
DateValue(Calendar value)
Creates an instance for the given Calendar value . |
protected |
DateValue(String value)
Creates a new DateValue initialized to the value
represented by the specified String . |
Method Summary | |
---|---|
Calendar |
getDate()
Returns (a copy) of this Calendar value. |
double |
getDouble()
Returns the time represented by this instance as the number of milliseconds since the epoch (1.1.1970, 0:00, UTC). |
long |
getLong()
Returns the time represented by this instance as the number of milliseconds since the epoch (1.1.1970, 0:00, UTC). |
String |
getString()
Returns the string represented of this DateValue value
formatted using a ISO8601-compliant date/time. |
int |
getType()
Returns PropertyType.DATE . |
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 DateValue(Calendar value)
Calendar
value
.
value
- the calendar for this value.protected DateValue(String value) throws ValueFormatException
DateValue
initialized to the value
represented by the specified String
.
The specified String
must be a ISO8601-compliant date/time
string.
value
- the string to be parsed.
ValueFormatException
- If the String
is not a valid
ISO8601-compliant date/time string.ISO8601
Method Detail |
---|
public int getType()
PropertyType.DATE
.
getType
in interface Value
public double getDouble()
getDouble
in interface Value
getDouble
in class BaseNonStreamValue
public String getString()
DateValue
value
formatted using a ISO8601-compliant date/time.
getString
in interface Value
public long getLong()
getLong
in interface Value
getLong
in class BaseNonStreamValue
public Calendar getDate()
Calendar
value. Modifying the
returned Calendar
does not change the value of this
instance.
getDate
in interface Value
getDate
in class BaseNonStreamValue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |