de.bea.domingo.util
Class GregorianTimeZone

java.lang.Object
  extended by java.util.Calendar
      extended by java.util.GregorianCalendar
          extended by de.bea.domingo.util.GregorianTimeZone
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Calendar>

public final class GregorianTimeZone
extends java.util.GregorianCalendar

A time-only Gregorian calendar.

Author:
Kurt Riede
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.GregorianCalendar
AD, BC
 
Fields inherited from class java.util.Calendar
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, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET
 
Constructor Summary
GregorianTimeZone()
          Default Constructor.
GregorianTimeZone(java.util.Calendar calendar)
          Creates a new Gregorian date from a given java.util.Calendar.
GregorianTimeZone(java.util.Date date)
          Creates a new Gregorian date from a given java.util.Date.
GregorianTimeZone(java.util.TimeZone timezone)
          Creates a new Gregorian time zone from a given time zone.
 
Method Summary
protected  void computeFields()
          Overwrites GregorianCalendar.computeFields(), to disable all date and time fields.
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
 int hashCode()
          Returns a hash code value for the object.
 void set(int field, int value)
          Overwrite prevents setting date and time fields.
 java.lang.String toString()
          Formats a date as a string in a locale-independent format.
 
Methods inherited from class java.util.GregorianCalendar
add, clone, computeTime, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, isLeapYear, roll, roll, setGregorianChange, setTimeZone
 
Methods inherited from class java.util.Calendar
after, before, clear, clear, compareTo, complete, get, getAvailableLocales, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, internalGet, isLenient, isSet, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GregorianTimeZone

public GregorianTimeZone()
Default Constructor.


GregorianTimeZone

public GregorianTimeZone(java.util.Date date)
Creates a new Gregorian date from a given java.util.Date.

Parameters:
date - the date for the new calendar

GregorianTimeZone

public GregorianTimeZone(java.util.Calendar calendar)
Creates a new Gregorian date from a given java.util.Calendar.

Parameters:
calendar - the original calendar for the new calendar

GregorianTimeZone

public GregorianTimeZone(java.util.TimeZone timezone)
Creates a new Gregorian time zone from a given time zone.

Parameters:
timezone - the time zone
Method Detail

set

public void set(int field,
                int value)
Overwrite prevents setting date and time fields.

Overrides:
set in class java.util.Calendar
Parameters:
field - the given calendar field.
value - the value to be set for the given calendar field.
See Also:
Calendar.set(int, int)

toString

public java.lang.String toString()
Formats a date as a string in a locale-independent format.

Overrides:
toString in class java.util.Calendar
Returns:
string representation of date in reverse format with leading zeros: YYYY-MM-DD.
See Also:
Object.toString()

computeFields

protected void computeFields()
Overwrites GregorianCalendar.computeFields(), to disable all date and time fields.

Overrides:
computeFields in class java.util.GregorianCalendar
See Also:
Calendar.computeFields()

equals

public boolean equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.util.GregorianCalendar
Parameters:
object - the reference object with which to compare.
Returns:
true if this object is the same as the object argument; false otherwise.
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.util.GregorianCalendar
Returns:
a hash code value for this object.
See Also:
Object.hashCode()


Domingo Java-API