|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.kwfgrid.gwes.jaxen.TimeScheme
public class TimeScheme
TimeScheme is a class for storing the time in different formats.
| Field Summary | |
|---|---|
Calendar |
cal
time format: Gregorian Calendar |
Date |
dat
time format: Date |
long |
ms
time format: number of milliseconds since January 1, 1970, 00:00:00 GMT |
| Constructor Summary | |
|---|---|
TimeScheme()
Constructs a default TimeScheme using the current time in the default time zone with the default locale. |
|
TimeScheme(int year,
int month,
int date)
Constructs a TimeScheme with the given date set in the default time zone with the default locale. |
|
TimeScheme(int year,
int month,
int date,
int hour,
int minute)
Constructs a TimeScheme with the given date and time set in the default time zone with the default locale. |
|
TimeScheme(int year,
int month,
int date,
int hour,
int minute,
int second)
Constructs a TimeScheme with the given date and time set in the default time zone with the default locale. |
|
TimeScheme(long msSince1970)
Constructs a TimeScheme with the given date set in the default time zone with the default locale. |
|
TimeScheme(String dateTime)
|
|
| Method Summary | |
|---|---|
void |
calToMs()
update ms and dat when cal is given. |
protected Object |
clone()
Creates a deep copy of the TimeScheme |
int |
compareTo(Object o)
Compares the TimeScheme to another object. |
Calendar |
getCal()
|
Date |
getDat()
|
String |
getDateTime()
|
long |
getMs()
|
void |
msToCal()
update cal and dat when ms is given. |
void |
setCal(Calendar cal)
|
void |
setDat(Date dat)
|
void |
setMs(long ms)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public Calendar cal
public Date dat
public long ms
| Constructor Detail |
|---|
public TimeScheme()
public TimeScheme(long msSince1970)
msSince1970 - the value in ms since 1970 used to set the date
public TimeScheme(String dateTime)
throws ParseException
ParseException
public TimeScheme(int year,
int month,
int date)
year - the value used to set the YEAR time field in the calendar.month - the value used to set the MONTH time field in the calendar.
Month value is 0-based. e.g., 0 for January.date - the value used to set the DATE time field in the calendar.
public TimeScheme(int year,
int month,
int date,
int hour,
int minute)
year - the value used to set the YEAR time field in the
calendar.month - the value used to set the MONTH time field in the
calendar. Month value is 0-based. e.g., 0 for January.date - the value used to set the DATE time field in the
calendar.hour - the value used to set the HOUR_OF_DAY time field in
the calendar.minute - the value used to set the MINUTE time field in the
calendar.
public TimeScheme(int year,
int month,
int date,
int hour,
int minute,
int second)
year - the value used to set the YEAR time field in the
calendar.month - the value used to set the MONTH time field in the
calendar. Month value is 0-based. e.g., 0 for January.date - the value used to set the DATE time field in the
calendar.hour - the value used to set the HOUR_OF_DAY time field in
the calendar.minute - the value used to set the MINUTE time field in the
calendar.second - the value used to set the SECOND time field in the
calendar.| Method Detail |
|---|
public void msToCal()
public void calToMs()
public String getDateTime()
public Calendar getCal()
public void setCal(Calendar cal)
public Date getDat()
public void setDat(Date dat)
public long getMs()
public void setMs(long ms)
public int compareTo(Object o)
compareTo in interface Comparableprotected Object clone()
clone in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||