| java.lang.Object java.util.Calendar java.util.GregorianCalendar org.mandarax.lib.date.SimpleDate
SimpleDate | public class SimpleDate extends GregorianCalendar (Code) | | A SimpleDate implementation which extends the java.util.GregorianCalendar .
A SimpleDate can be in synchronized mode and not synchronized (absolute) mode.
In the not synchronized mode the absolute time values independent from the time zone are used for
comparison of calendar objects (e.g. a SimpleDate with time value 19:00 p.m. in Germany Berlin is
the same as SimpleDate object with time value 19:00 p.m. in USA Los Angeles).
In the synchronized mode two SimpleDate objects are equal if they have the same real time value
(e.g. a SimpleDate with time value 19:00 p.m. in Germany Berlin is the same as the SimpleDate object with
time value 10:00 a.m. in USA Los Angeles (- 8 hours)). The time zone offset is given by the java.util.Timezone.
author: Adrian Paschke version: 3.4 <7 March 05> since: 3.3.1 |
Constructor Summary | |
public | SimpleDate() Constructs a default, synchronized SimpleDate using the current time
in the default time zone with the default locale. | public | SimpleDate(boolean syn) Constructs a defaultSimpleDate using the current time
in the default time zone with the default locale and synchronized flag. | public | SimpleDate(TimeZone zone, boolean syn) Constructs a SimpleDate based on the current time
in the given time zone with the default locale. | public | SimpleDate(Locale aLocale, boolean syn) Constructs a SimpleDate based on the current time
in the default time zone with the given locale and synchronized flag. | public | SimpleDate(TimeZone zone, Locale aLocale, boolean syn) Constructs a SimpleDate based on the current time
in the given time zone with the given locale and synchronized flag. | public | SimpleDate(int year, int month, int dayOfMonth, boolean syn) Constructs a SimpleDate with the given date set
in the default time zone with the default locale and synchronized flag.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. | public | SimpleDate(int year, int month, int dayOfMonth, int hourOfDay, int minute, boolean syn) Constructs a SimpleDate with the given date
and time set for the default time zone with the default locale and synchronized flag.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. | public | SimpleDate(int year, int month, int dayOfMonth, int hourOfDay, int minute, int second, boolean syn) Constructs a SimpleDate with the given date
and time set for the default time zone with the default locale and synchronized flag.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. | public | SimpleDate(TimeZone zone) Constructs a synchronized SimpleDate based on the current time
in the given time zone with the default locale. | public | SimpleDate(Locale aLocale) Constructs a synchronized SimpleDate based on the current time
in the default time zone with the given locale. | public | SimpleDate(TimeZone zone, Locale aLocale) Constructs a synchronizedSimpleDate based on the current time
in the given time zone with the given locale. | public | SimpleDate(int year, int month, int dayOfMonth) Constructs a synchronizedSimpleDate with the given date set
in the default time zone with the default locale.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. | public | SimpleDate(int year, int month, int dayOfMonth, int hourOfDay, int minute) Constructs a synchronizedSimpleDate with the given date
and time set for the default time zone with the default locale.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. | public | SimpleDate(int year, int month, int dayOfMonth, int hourOfDay, int minute, int second) Constructs a synchronized SimpleDate with the given date
and time set for the default time zone with the default locale.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. |
Method Summary | |
public boolean | after(Object obj) Returns whether this SimpleDate represents a time
after the time represented by the specified
Object , if and only if obj is a Calendar
instance. | public boolean | before(Object obj) Returns whether this SimpleDate represents a time
before the time represented by the specified
Object , if and only if obj is a Calendar
instance. | public boolean | equals(Object obj) Compares this SimpleDate to the specified
Object . | public boolean | isSynchronized() | public void | setSynchronized(boolean syn) |
SimpleDate | public SimpleDate()(Code) | | Constructs a default, synchronized SimpleDate using the current time
in the default time zone with the default locale.
|
SimpleDate | public SimpleDate(boolean syn)(Code) | | Constructs a defaultSimpleDate using the current time
in the default time zone with the default locale and synchronized flag.
|
SimpleDate | public SimpleDate(TimeZone zone, boolean syn)(Code) | | Constructs a SimpleDate based on the current time
in the given time zone with the default locale.
Parameters: zone - the given time zone. Parameters: syn - synchronized flag |
SimpleDate | public SimpleDate(Locale aLocale, boolean syn)(Code) | | Constructs a SimpleDate based on the current time
in the default time zone with the given locale and synchronized flag.
Parameters: aLocale - the given locale. Parameters: syn - synchronized flag |
SimpleDate | public SimpleDate(TimeZone zone, Locale aLocale, boolean syn)(Code) | | Constructs a SimpleDate based on the current time
in the given time zone with the given locale and synchronized flag.
Parameters: zone - the given time zone. Parameters: aLocale - the given locale. Parameters: syn - synchronized flag |
SimpleDate | public SimpleDate(int year, int month, int dayOfMonth, boolean syn)(Code) | | Constructs a SimpleDate with the given date set
in the default time zone with the default locale and synchronized flag.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. e.g., 0 for January. Parameters: dayOfMonth - the value used to set the DAY_OF_MONTH calendar field in the calendar. Parameters: syn - synchronized flag |
SimpleDate | public SimpleDate(int year, int month, int dayOfMonth, int hourOfDay, int minute, boolean syn)(Code) | | Constructs a SimpleDate with the given date
and time set for the default time zone with the default locale and synchronized flag.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. e.g., 0 for January. Parameters: dayOfMonth - the value used to set the DAY_OF_MONTH calendar field in the calendar. Parameters: hourOfDay - the value used to set the HOUR_OF_DAY calendar fieldin the calendar. Parameters: minute - the value used to set the MINUTE calendar fieldin the calendar. |
SimpleDate | public SimpleDate(int year, int month, int dayOfMonth, int hourOfDay, int minute, int second, boolean syn)(Code) | | Constructs a SimpleDate with the given date
and time set for the default time zone with the default locale and synchronized flag.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. e.g., 0 for January. Parameters: dayOfMonth - the value used to set the DAY_OF_MONTH calendar field in the calendar. Parameters: hourOfDay - the value used to set the HOUR_OF_DAY calendar fieldin the calendar. Parameters: minute - the value used to set the MINUTE calendar fieldin the calendar. Parameters: second - the value used to set the SECOND calendar fieldin the calendar. |
SimpleDate | public SimpleDate(TimeZone zone)(Code) | | Constructs a synchronized SimpleDate based on the current time
in the given time zone with the default locale.
Parameters: zone - the given time zone. |
SimpleDate | public SimpleDate(Locale aLocale)(Code) | | Constructs a synchronized SimpleDate based on the current time
in the default time zone with the given locale.
Parameters: aLocale - the given locale. |
SimpleDate | public SimpleDate(TimeZone zone, Locale aLocale)(Code) | | Constructs a synchronizedSimpleDate based on the current time
in the given time zone with the given locale.
Parameters: zone - the given time zone. Parameters: aLocale - the given locale. |
SimpleDate | public SimpleDate(int year, int month, int dayOfMonth)(Code) | | Constructs a synchronizedSimpleDate with the given date set
in the default time zone with the default locale.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. e.g., 0 for January. Parameters: dayOfMonth - the value used to set the DAY_OF_MONTH calendar field in the calendar. |
SimpleDate | public SimpleDate(int year, int month, int dayOfMonth, int hourOfDay, int minute)(Code) | | Constructs a synchronizedSimpleDate with the given date
and time set for the default time zone with the default locale.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. e.g., 0 for January. Parameters: dayOfMonth - the value used to set the DAY_OF_MONTH calendar field in the calendar. Parameters: hourOfDay - the value used to set the HOUR_OF_DAY calendar fieldin the calendar. Parameters: minute - the value used to set the MINUTE calendar fieldin the calendar. |
SimpleDate | public SimpleDate(int year, int month, int dayOfMonth, int hourOfDay, int minute, int second)(Code) | | Constructs a synchronized SimpleDate with the given date
and time set for the default time zone with the default locale.
Parameters: year - the value used to set the YEAR calendar field in the calendar. Parameters: month - the value used to set the MONTH calendar field in the calendar.Month value is 0-based. e.g., 0 for January. Parameters: dayOfMonth - the value used to set the DAY_OF_MONTH calendar field in the calendar. Parameters: hourOfDay - the value used to set the HOUR_OF_DAY calendar fieldin the calendar. Parameters: minute - the value used to set the MINUTE calendar fieldin the calendar. Parameters: second - the value used to set the SECOND calendar fieldin the calendar. |
after | public boolean after(Object obj)(Code) | | Returns whether this SimpleDate represents a time
after the time represented by the specified
Object , if and only if obj is a Calendar
instance. Otherwise, the method returns false .
In synchronized mode only the time values are compared, in not synchronized mode
the time zone offsets are added (~the absolute times are compared).
Parameters: obj - the Object to be compared true if the time of this Calendar isafter the time represented by when ; false otherwise. See Also: SimpleDate.compareTo(Calendar) |
before | public boolean before(Object obj)(Code) | | Returns whether this SimpleDate represents a time
before the time represented by the specified
Object , if and only if obj is a Calendar
instance. Otherwise, the method returns false .
In synchronized mode only the time values are compared, in not synchronized mode
the time zone offsets are added (~ the absolute times are compared).
Parameters: obj - the Object to be compared true if the time of thisCalendar is before the time represented byobj ; false otherwise. |
equals | public boolean equals(Object obj)(Code) | | Compares this SimpleDate to the specified
Object . The result is true if and
only if the argument is a instance of Calendar
that represents the same time value (millisecond offset from
the Epoch) in the synchronized
mode or the time value + the time zone offsets (in milliseconds) as
this object (~ the absolute times are compared).
Parameters: obj - the object to compare with. true if this object is equal to obj ;false otherwise. |
isSynchronized | public boolean isSynchronized()(Code) | | Indicated wether this SimpleDate is in synchronized mode or not
boolean true:synchronized - false: not synchronize |
setSynchronized | public void setSynchronized(boolean syn)(Code) | | Set the synchronized mode
Parameters: syn - synchronized flag |
Methods inherited from java.util.Calendar | abstract public void add(int field, int amount)(Code)(Java Doc) public boolean after(Object when)(Code)(Java Doc) public boolean before(Object when)(Code)(Java Doc) final public void clear()(Code)(Java Doc) final public void clear(int field)(Code)(Java Doc) public Object clone()(Code)(Java Doc) public int compareTo(Calendar anotherCalendar)(Code)(Java Doc) protected void complete()(Code)(Java Doc) abstract protected void computeFields()(Code)(Java Doc) abstract protected void computeTime()(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public int get(int field)(Code)(Java Doc) public int getActualMaximum(int field)(Code)(Java Doc) public int getActualMinimum(int field)(Code)(Java Doc) public static synchronized Locale[] getAvailableLocales()(Code)(Java Doc) public String getDisplayName(int field, int style, Locale locale)(Code)(Java Doc) public Map<String, Integer> getDisplayNames(int field, int style, Locale locale)(Code)(Java Doc) public int getFirstDayOfWeek()(Code)(Java Doc) abstract public int getGreatestMinimum(int field)(Code)(Java Doc) public static Calendar getInstance()(Code)(Java Doc) public static Calendar getInstance(TimeZone zone)(Code)(Java Doc) public static Calendar getInstance(Locale aLocale)(Code)(Java Doc) public static Calendar getInstance(TimeZone zone, Locale aLocale)(Code)(Java Doc) abstract public int getLeastMaximum(int field)(Code)(Java Doc) abstract public int getMaximum(int field)(Code)(Java Doc) public int getMinimalDaysInFirstWeek()(Code)(Java Doc) abstract public int getMinimum(int field)(Code)(Java Doc) final public Date getTime()(Code)(Java Doc) public long getTimeInMillis()(Code)(Java Doc) public TimeZone getTimeZone()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) final protected int internalGet(int field)(Code)(Java Doc) public boolean isLenient()(Code)(Java Doc) final public boolean isSet(int field)(Code)(Java Doc) abstract public void roll(int field, boolean up)(Code)(Java Doc) public void roll(int field, int amount)(Code)(Java Doc) public void set(int field, int value)(Code)(Java Doc) final public void set(int year, int month, int date)(Code)(Java Doc) final public void set(int year, int month, int date, int hourOfDay, int minute)(Code)(Java Doc) final public void set(int year, int month, int date, int hourOfDay, int minute, int second)(Code)(Java Doc) public void setFirstDayOfWeek(int value)(Code)(Java Doc) public void setLenient(boolean lenient)(Code)(Java Doc) public void setMinimalDaysInFirstWeek(int value)(Code)(Java Doc) final public void setTime(Date date)(Code)(Java Doc) public void setTimeInMillis(long millis)(Code)(Java Doc) public void setTimeZone(TimeZone value)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|