|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--java.util.Calendar
This is a utility class for storing time in a useful format
(Currently only supports Gregorian time)
| Field Summary | |
static int |
AM
AM ranges from 00:00 on a 24 hour clock |
static int |
AM_PM
|
static int |
APRIL
|
static int |
AUGUST
|
static int |
DATE
|
static int |
DAY_OF_MONTH
|
static int |
DAY_OF_WEEK
|
static int |
DECEMBER
|
static int |
FEBRUARY
|
protected int[] |
fields
The array that holds the field data |
static int |
FRIDAY
|
static int |
HOUR
|
static int |
HOUR_OF_DAY
|
static int |
JANUARY
|
static int |
JULY
|
static int |
JUNE
|
static int |
MARCH
|
static int |
MAY
|
static int |
MILLISECOND
|
static int |
MINUTE
|
static int |
MONDAY
|
static int |
MONTH
|
static int |
NOVEMBER
|
static int |
OCTOBER
|
static int |
PM
PM ranges from 12:00 on a 24 hour clock |
static int |
SATURDAY
|
static int |
SECOND
|
static int |
SEPTEMBER
|
static int |
SUNDAY
|
static int |
THURSDAY
|
protected long |
time
The time value, which is the number of milliseconds since Jan 1, 1970 This is always kept up to date |
static int |
TUESDAY
|
static int |
WEDNESDAY
|
static int |
YEAR
|
| Constructor Summary | |
protected |
Calendar()
Constructs a Calendar with the default time zone and default locale. |
| Method Summary | |
boolean |
after(Object cal2)
Compares the 'raw' UTC time in this Calendar with the UTC time of the given Calendar (non-Calendar objects return false) and return true if this Calendar is 'later' than the given Calendar. |
boolean |
before(Object cal2)
Compares the 'raw' UTC time in this Calendar with the UTC time of the given Calendar (non-Calendar objects return false) and return true if this Calendar is 'earlier' than the given Calendar |
protected abstract void |
computeFields()
Set the field values from the current time |
protected abstract void |
computeTime()
Set the time from the current field values |
boolean |
equals(Object obj)
Returns true if the given object represents a Calendar with the same time value as this one. |
int |
get(int field)
Gets the value of the given field. |
static Calendar |
getInstance()
Gets a calendar using the default time zone and default locale. ( com.dctl.j2me.date.GMTCalendar and com.dctl.j2me.date.GMTTimeZone |
static Calendar |
getInstance(TimeZone zone)
Gets a calendar using the specified time zone and default locale. |
Date |
getTime()
Get the current time of this Calendar. |
protected long |
getTimeInMillis()
Gets this Calendar's current time as a long expressed in milliseconds after January 1, 1970, 0:00:00 GMT (the epoch). |
TimeZone |
getTimeZone()
Gets the time zone object |
void |
set(int field,
int value)
Sets the time field (except DAY_OF_WEEK) with the given value. |
void |
setTime(Date date)
Sets the current time using the given Date |
protected void |
setTimeInMillis(long millis)
Sets the current time from the given value |
void |
setTimeZone(TimeZone value)
Sets the time zone to the given zone |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int YEAR
public static final int MONTH
public static final int DATE
public static final int DAY_OF_MONTH
public static final int DAY_OF_WEEK
public static final int AM_PM
public static final int HOUR
public static final int HOUR_OF_DAY
public static final int MINUTE
public static final int SECOND
public static final int MILLISECOND
public static final int SUNDAY
public static final int MONDAY
public static final int TUESDAY
public static final int WEDNESDAY
public static final int THURSDAY
public static final int FRIDAY
public static final int SATURDAY
public static final int JANUARY
public static final int FEBRUARY
public static final int MARCH
public static final int APRIL
public static final int MAY
public static final int JUNE
public static final int JULY
public static final int AUGUST
public static final int SEPTEMBER
public static final int OCTOBER
public static final int NOVEMBER
public static final int DECEMBER
public static final int AM
public static final int PM
protected long time
protected int[] fields
| Constructor Detail |
protected Calendar()
| Method Detail |
public boolean after(Object cal2)
cal2 - another Calendar
public boolean before(Object cal2)
cal2 - another Calendar
public boolean equals(Object obj)
equals in class Objectobj - the object for comparison
public final int get(int field)
ArrayIndexOutOfBoundsException - an invalid parameter is givenpublic static Calendar getInstance()
com.dctl.j2me.date.GMTCalendar and com.dctl.j2me.date.GMTTimeZone
public static Calendar getInstance(TimeZone zone)
zone - the time zone to use
public final Date getTime()
protected long getTimeInMillis()
public TimeZone getTimeZone()
public final void set(int field,
int value)
DAY_OF_WEEK) with the given value.
DATEDAY_OF_MONTHMONTH
field - the given time field.value - the value to be set for the given time field.
ArrayIndexOutOfBoundsException - if an illegal field
parameter is received.public final void setTime(Date date)
protected void setTimeInMillis(long millis)
public void setTimeZone(TimeZone value)
value - the given time zone.protected abstract void computeFields()
protected abstract void computeTime()
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||