|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Calendar
barsuift.simLife.time.SimLifeCalendar
public class SimLifeCalendar
| Field Summary | |
|---|---|
static int |
DAY_PER_MONTH
|
static int |
DAY_PER_WEEK
|
static int |
DAY_PER_YEAR
|
static int |
FIRDAY
Value of the Calendar.DAY_OF_WEEK field indicating Firday. |
static int |
MINUTE_PER_DAY
|
static int |
MONTH_PER_YEAR
|
static int |
MS_PER_SECOND
|
static int |
NOSDAY
Value of the Calendar.DAY_OF_WEEK field indicating Nosday. |
static int |
SECOND_PER_MINUTE
|
static int |
STOODAY
Value of the Calendar.DAY_OF_WEEK field indicating Stooday. |
static int |
THUNSDAY
Value of the Calendar.DAY_OF_WEEK field indicating Thunsday. |
static int |
WATSDAY
Value of the Calendar.DAY_OF_WEEK field indicating Watsday. |
static int |
WEEK_PER_MONTH
|
static int |
WEEK_PER_YEAR
|
static int |
WINDAY
Value of the Calendar.DAY_OF_WEEK field indicating Winday. |
| Fields inherited from class java.util.Calendar |
|---|
ALL_STYLES, AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, LONG, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SHORT, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET |
| Constructor Summary | |
|---|---|
SimLifeCalendar()
|
|
SimLifeCalendar(long millis)
|
|
SimLifeCalendar(SimLifeCalendar copy)
|
|
SimLifeCalendar(SimLifeCalendarState calendarState)
|
|
SimLifeCalendar(java.lang.String date)
|
|
| Method Summary | |
|---|---|
void |
add(int field,
int amount)
|
protected void |
computeFields()
|
protected void |
computeTime()
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
formatDate()
Date is formatted with the following pattern : mm:ss DayInWeek DayInMonth Month Year. |
int |
getGreatestMinimum(int field)
|
int |
getLeastMaximum(int field)
|
int |
getMaximum(int field)
|
int |
getMinimum(int field)
|
SimLifeCalendarState |
getState()
Gets the state of the persistent object. |
void |
roll(int field,
boolean up)
|
void |
roll(int field,
int amount)
|
void |
setTime(java.lang.String date)
Parse the given date and set the given values to this calendar instance. |
void |
synchronize()
Synchronizes the State instance with the current object state. |
| Methods inherited from class java.util.Calendar |
|---|
after, before, clear, clear, clone, compareTo, complete, get, getActualMaximum, getActualMinimum, getAvailableLocales, getDisplayName, getDisplayNames, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, getTimeZone, hashCode, internalGet, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, setTimeZone, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int NOSDAY
Calendar.DAY_OF_WEEK field indicating Nosday.
public static final int WATSDAY
Calendar.DAY_OF_WEEK field indicating Watsday.
public static final int STOODAY
Calendar.DAY_OF_WEEK field indicating Stooday.
public static final int FIRDAY
Calendar.DAY_OF_WEEK field indicating Firday.
public static final int THUNSDAY
Calendar.DAY_OF_WEEK field indicating Thunsday.
public static final int WINDAY
Calendar.DAY_OF_WEEK field indicating Winday.
public static final int MS_PER_SECOND
public static final int SECOND_PER_MINUTE
public static final int MINUTE_PER_DAY
public static final int DAY_PER_WEEK
public static final int WEEK_PER_MONTH
public static final int DAY_PER_MONTH
public static final int MONTH_PER_YEAR
public static final int WEEK_PER_YEAR
public static final int DAY_PER_YEAR
| Constructor Detail |
|---|
public SimLifeCalendar()
public SimLifeCalendar(java.lang.String date)
public SimLifeCalendar(long millis)
public SimLifeCalendar(SimLifeCalendar copy)
public SimLifeCalendar(SimLifeCalendarState calendarState)
| Method Detail |
|---|
public SimLifeCalendarState getState()
Persistent
Implementing class should consider systematically calling the Persistent.synchronize() method before returning the
actual state. It is not up to clients to synchronize the object themselves.
getState in interface Persistent<SimLifeCalendarState>public void synchronize()
Persistent
It is not up to clients to synchronize the object themselves. Instead, this method should be called by the
Persistent.getState() method.
On the other hand, this method is provided to allow aggregation classes to synchronize their aggregated instances
without requiring the call to the Persistent.getState() method.
synchronize in interface Persistent<SimLifeCalendarState>protected void computeTime()
computeTime in class java.util.Calendarprotected void computeFields()
computeFields in class java.util.Calendar
public void add(int field,
int amount)
add in class java.util.Calendar
public void roll(int field,
boolean up)
roll in class java.util.Calendar
public void roll(int field,
int amount)
roll in class java.util.Calendarpublic int getMinimum(int field)
getMinimum in class java.util.Calendarpublic int getMaximum(int field)
getMaximum in class java.util.Calendarpublic int getGreatestMinimum(int field)
getGreatestMinimum in class java.util.Calendarpublic int getLeastMaximum(int field)
getLeastMaximum in class java.util.Calendarpublic boolean equals(java.lang.Object obj)
equals in class java.util.Calendarpublic java.lang.String formatDate()
mm:ss DayInWeek DayInMonth Month Year. For example,
it can be 19:59 Nosday 18 Tom 0455
Here are the rules to be applied when formatting :
public void setTime(java.lang.String date)
formatDate() method would generate.
date - the date to parse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||