sun.util
Class BuddhistCalendar

java.lang.Object
  extended by java.util.Calendar
      extended by java.util.GregorianCalendar
          extended by sun.util.BuddhistCalendar
All Implemented Interfaces:
Serializable, Cloneable

public class BuddhistCalendar
extends GregorianCalendar

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
BuddhistCalendar()
          Constructs a default BuddhistCalendar using the current time in the default time zone with the default locale.
BuddhistCalendar(Locale aLocale)
          Constructs a BuddhistCalendar based on the current time in the default time zone with the given locale.
BuddhistCalendar(TimeZone zone)
          Constructs a BuddhistCalendar based on the current time in the given time zone with the default locale.
BuddhistCalendar(TimeZone zone, Locale aLocale)
          Constructs a BuddhistCalendar based on the current time in the given time zone with the given locale.
 
Method Summary
 void add(int field, int amount)
          Adds the specified (signed) amount of time to the given time field.
 boolean equals(Object obj)
          Compares this BuddhistCalendar to an object reference.
 int get(int field)
          Gets the value for a given time field.
 int hashCode()
          Override hashCode.
 void roll(int field, int amount)
          Add to field a signed amount without changing larger fields.
 void set(int field, int value)
          Sets the time field with the given value.
 
Methods inherited from class java.util.GregorianCalendar
computeFields, computeTime, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, isLeapYear, roll, setGregorianChange
 
Methods inherited from class java.util.Calendar
after, before, clear, clear, clone, complete, getAvailableLocales, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, getTimeZone, internalGet, isLenient, isSet, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, setTimeZone, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuddhistCalendar

public BuddhistCalendar()
Constructs a default BuddhistCalendar using the current time in the default time zone with the default locale.


BuddhistCalendar

public BuddhistCalendar(TimeZone zone)
Constructs a BuddhistCalendar based on the current time in the given time zone with the default locale.

Parameters:
zone - the given time zone.

BuddhistCalendar

public BuddhistCalendar(Locale aLocale)
Constructs a BuddhistCalendar based on the current time in the default time zone with the given locale.

Parameters:
aLocale - the given locale.

BuddhistCalendar

public BuddhistCalendar(TimeZone zone,
                        Locale aLocale)
Constructs a BuddhistCalendar based on the current time in the given time zone with the given locale.

Parameters:
zone - the given time zone.
aLocale - the given locale.
Method Detail

equals

public boolean equals(Object obj)
Compares this BuddhistCalendar to an object reference.

Overrides:
equals in class GregorianCalendar
Parameters:
obj - the object reference with which to compare
Returns:
true if this object is equal to obj; false otherwise
See Also:
Object.hashCode(), Hashtable

hashCode

public int hashCode()
Override hashCode. Generates the hash code for the BuddhistCalendar object

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

get

public int get(int field)
Gets the value for a given time field.

Overrides:
get in class Calendar
Parameters:
field - the given time field.
Returns:
the value for the given time field.

set

public void set(int field,
                int value)
Sets the time field with the given value.

Overrides:
set in class Calendar
Parameters:
field - the given time field.
value - the value to be set for the given time field.

add

public void add(int field,
                int amount)
Adds the specified (signed) amount of time to the given time field.

Overrides:
add in class GregorianCalendar
Parameters:
field - the time field.
amount - the amount of date or time to be added to the field.

roll

public void roll(int field,
                 int amount)
Add to field a signed amount without changing larger fields. A negative roll amount means to subtract from field without changing larger fields.

Overrides:
roll in class GregorianCalendar
Parameters:
field - the time field.
amount - the signed amount to add to field.
See Also:
GregorianCalendar.add(int, int), Calendar.set(int, int)