|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Calendar | +--java.util.GregorianCalendar | +--orderprocessing.CalculationCalendar
This class provides an increment function for Gregorian Calendars so that a future date may be easily calculated. It can also tell you which of two dates is earlier by returning the earlier (or later) one to you.
Fields inherited from class java.util.GregorianCalendar |
AD, BC |
Fields inherited from class java.util.Calendar |
AM, AM_PM, APRIL, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, FRIDAY, HOUR, HOUR_OF_DAY, JANUARY, JULY, JUNE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET |
Constructor Summary | |
CalculationCalendar()
|
|
CalculationCalendar(int year,
int month,
int date)
Constructs a CalculationCalendar with the given date set in the default time zone with the default locale. |
|
CalculationCalendar(int year,
int month,
int date,
int hour,
int minute)
Constructs a CalculationCalendar with the given date and time set for the default time zone with the default locale. |
|
CalculationCalendar(int year,
int month,
int date,
int hour,
int minute,
int second)
Constructs a CalculationCalendar with the given date and time set for the default time zone with the default locale. |
|
CalculationCalendar(java.util.Locale aLocale)
Constructs a CalculationCalendar based on the current time in the default time zone with the given locale. |
|
CalculationCalendar(java.util.TimeZone zone)
Constructs a CalculationCalendar based on the current time in the given time zone with the default locale. |
|
CalculationCalendar(java.util.TimeZone zone,
java.util.Locale aLocale)
Constructs a CalculationCalendar based on the current time in the given time zone with the given locale. |
Method Summary | |
CalculationCalendar |
incrementedBy(int field,
int amount)
Increments a calendar by an amount dependent on the chosen date field |
CalculationCalendar |
max(CalculationCalendar other)
Returns the maximum (later) of two dates. |
CalculationCalendar |
min(CalculationCalendar other)
Returns the minimum (earlier) of two dates. |
Methods inherited from class java.util.GregorianCalendar |
add, equals, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, hashCode, isLeapYear, roll, roll, setGregorianChange |
Methods inherited from class java.util.Calendar |
after, before, clear, clear, clone, get, getAvailableLocales, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeZone, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeZone, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CalculationCalendar()
public CalculationCalendar(java.util.TimeZone zone)
zone
- the given time zone.public CalculationCalendar(java.util.Locale aLocale)
aLocale
- the given locale.public CalculationCalendar(java.util.TimeZone zone, java.util.Locale aLocale)
zone
- the given time zone.aLocale
- the given locale.public CalculationCalendar(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 CalculationCalendar(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 CalculationCalendar(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 CalculationCalendar incrementedBy(int field, int amount)
field
- which field should be incrementedamount
- the amount to increment "field" by.public CalculationCalendar max(CalculationCalendar other)
other
- a calendar to compare with this.public CalculationCalendar min(CalculationCalendar other)
other
- a calendar to compare with this.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |