|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--spki.BaseObj
|
+--spki.Date
SPKI Date class.
Formal definition:
<date>:: {ASCII-encoded <byte-string> of the form "YYYY-MM-DD_HH:MM:SS" in UTC time} ;
| Field Summary | |
private static String |
__ME
This class's full name. |
private Date |
date
This object's date value as a java.util.Date object. |
private String |
date_string
This object's date value as a date-formated String. |
static String |
MAX_DATE
The date +infinity (9999-12-31_11:59:59 GMT). |
static String |
MIN_DATE
The date -infinity (0001-01-02_00:00:00 GMT). |
static String |
SEXP_NAME
Date doesn't have an S-Expression type name since it's just a byte-string, so this field is initialized to null. |
private static SimpleDateFormat |
spki_date
The date-format object used for parsing and formating String value of a date. |
| Fields inherited from class spki.BaseObj |
__ME,
cache_sexp,
cached_sexp,
DEFAULT_HASH_ALG,
locked,
SEXP_NAME |
| Constructor Summary | |
Date()
Create an immutable Date object with the current time. |
|
Date(Date date)
Create an immutable Date object from a java.util.Date object. |
|
Date(SExpression sexp)
Create an immutable Date object from an S-Expression. |
|
Date(String date)
Create an immutable Date object from a date-formated String. |
|
| Method Summary | |
(package private) static void |
The static initializer for the date-format object. |
boolean |
after(Date when)
Check if this is later than the given java.util.Date object. |
boolean |
after(Date when)
Check if this is later than the given Date object. |
boolean |
after(String when)
Check if this is later than the given date-formated String. |
boolean |
before(Date when)
Check if this is earlier than the given java.util.Date object. |
boolean |
before(Date when)
Check if this is earlier than the given Date object. |
boolean |
before(String when)
Check if this is earlier than the given date-formated String. |
int |
compareTo(Date when)
Compare this with the given java.util.Date object. |
int |
compareTo(Date when)
Compare this with the given Date object. |
int |
compareTo(String when)
Compare this with the given date-formated String. |
boolean |
equals(Date when)
Check if this is equal to the given java.util.Date object. |
boolean |
equals(Date when)
Check if this is equal to the given Date object. |
boolean |
equals(String when)
Check if this is equal to the given date-formated String. |
Date |
max(Date when)
Compare this with given date and return the later one. |
Date |
min(Date when)
Compare this with given date and return the earlier one. |
Date |
toJDate()
Get the java.util.Date object representing this object. |
SExpression |
toSExpression()
Build an SExpression representing this object. |
String |
toString()
Return this object as a string, or null. |
| Methods inherited from class spki.BaseObj |
disableSExpressionCaching,
enableSExpressionCaching,
extractHashAlgId,
getCachedSExpression,
isLocked,
isSListOfType,
lock,
providerToSPKI,
setCachedSExpression,
spkiToProvider |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
| Field Detail |
private static final String __ME
public static final String SEXP_NAME
private static SimpleDateFormat spki_date
SimpleDateFormatpublic static final String MAX_DATE
public static final String MIN_DATE
private Date date
Dateprivate String date_string
spki_date| Constructor Detail |
public Date()
throws SPKIException
public Date(SExpression sexp)
throws ParseException,
SPKIException
BaseObj.BaseObj(SExpression)
public Date(Date date)
throws SPKIException
date - a java.util.Date object to build this object with.
public Date(String date)
throws SPKIException
date - a date-formated String to build this object with.| Method Detail |
static void()
spki_date
public SExpression toSExpression()
throws SPKIException
public String toString()
BaseObj.toSExpression()public Date toJDate()
Datepublic int compareTo(Date when)
when - the java.util.Date to compare with.Date.compareTo(java.util.Date)public int compareTo(Date when)
when - the Date to compare with.compareTo(java.util.Date)
public int compareTo(String when)
throws ParseException
when - the date-formated String to compare with.compareTo(java.util.Date)public boolean equals(Date when)
when - the java.util.Date to compare with.Date.equals(Object)public boolean equals(Date when)
when - the Date to compare with.equals(java.util.Date)
public boolean equals(String when)
throws ParseException
when - the date-formated String to compare with.equals(java.util.Date)public boolean after(Date when)
when - the java.util.Date to compare with.Date.after(java.util.Date)public boolean after(Date when)
when - the Date to compare with.after(java.util.Date)
public boolean after(String when)
throws ParseException
when - the date-formated String to compare with.after(java.util.Date)public boolean before(Date when)
when - the java.util.Date to compare with.Date.before(java.util.Date)public boolean before(Date when)
when - the Date to compare with.before(java.util.Date)
public boolean before(String when)
throws ParseException
when - the date-formated String to compare with.before(java.util.Date)public Date min(Date when)
when - a Date object to compare with.public Date max(Date when)
when - a Date object to compare with.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||