java.lang.Object | |||
↳ | java.util.Calendar | ||
↳ | java.util.GregorianCalendar | ||
↳ | sun.util.BuddhistCalendar |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a default BuddhistCalendar using the current time
in the default time zone with the default locale.
| |||||||||||
Constructs a BuddhistCalendar based on the current time
in the given time zone with the default locale.
| |||||||||||
Constructs a BuddhistCalendar based on the current time
in the default time zone with the given locale.
| |||||||||||
Constructs a BuddhistCalendar based on the current time
in the given time zone with the given locale.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds the specified (signed) amount of time to the given time field.
| |||||||||||
Compares this BuddhistCalendar to an object reference.
| |||||||||||
Gets the value for a given time field.
| |||||||||||
Returns the maximum value that this field could have, given the
current date.
| |||||||||||
Returns the string representation of the calendar
field value in the given style and
locale . | |||||||||||
Returns a
Map containing all names of the calendar
field in the given style and
locale and their corresponding field values. | |||||||||||
Override hashCode.
| |||||||||||
Add to field a signed amount without changing larger fields.
| |||||||||||
Sets the time field with the given value.
| |||||||||||
Return a string representation of this calendar.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a default BuddhistCalendar using the current time in the default time zone with the default locale.
Constructs a BuddhistCalendar based on the current time in the given time zone with the default locale.
zone | the given time zone. |
---|
Constructs a BuddhistCalendar based on the current time in the default time zone with the given locale.
aLocale | the given locale. |
---|
Constructs a BuddhistCalendar based on the current time in the given time zone with the given locale.
zone | the given time zone. |
---|---|
aLocale | the given locale. |
Adds the specified (signed) amount of time to the given time field.
field | the time field. |
---|---|
amount | the amount of date or time to be added to the field. |
Compares this BuddhistCalendar to an object reference.
obj | the object reference with which to compare |
---|
obj
; false otherwise
Gets the value for a given time field.
field | the given time field. |
---|
Returns the maximum value that this field could have, given the
current date. For example, with the date "Feb 3, 2540" and the
DAY_OF_MONTH
field, the actual maximum is 28; for
"Feb 3, 2539" it is 29.
field | the field to determine the maximum of |
---|
Returns the string representation of the calendar
field
value in the given style
and
locale
. If no string representation is
applicable, null
is returned. This method calls
get(field)
to get the calendar
field
value if the string representation is
applicable to the given calendar field
.
For example, if this Calendar
is a
GregorianCalendar
and its date is 2005-01-01, then
the string representation of the MONTH
field would be
"January" in the long style in an English locale or "Jan" in
the short style. However, no string representation would be
available for the DAY_OF_MONTH
field, and this method
would return null
.
The default implementation supports the calendar fields for
which a DateFormatSymbols
has names in the given
locale
.
field | the calendar field for which the string representation is returned |
---|---|
style | the style applied to the string representation; one of
SHORT or LONG . |
locale | the locale for the string representation |
field
in the given style
, or
null
if no string representation is
applicable.Returns a Map
containing all names of the calendar
field
in the given style
and
locale
and their corresponding field values. For
example, if this Calendar
is a GregorianCalendar
, the returned map would contain "Jan" to
JANUARY
, "Feb" to FEBRUARY
, and so on, in the
short
style in an English locale.
The values of other calendar fields may be taken into
account to determine a set of display names. For example, if
this Calendar
is a lunisolar calendar system and
the year value given by the YEAR
field has a leap
month, this method would return month names containing the leap
month name, and month names are mapped to their values specific
for the year.
The default implementation supports display names contained in
a DateFormatSymbols
. For example, if field
is MONTH
and style
is ALL_STYLES
, this method returns a Map
containing
all strings returned by getShortMonths()
and getMonths()
.
field | the calendar field for which the display names are returned |
---|---|
style | the style applied to the display names; one of SHORT , LONG , or ALL_STYLES . |
locale | the locale for the display names |
Map
containing all display names in
style
and locale
and their
field values, or null
if no display names
are defined for field
Override hashCode. Generates the hash code for the BuddhistCalendar object
Add to field a signed amount without changing larger fields. A negative roll amount means to subtract from field without changing larger fields.
field | the time field. |
---|---|
amount | the signed amount to add to field .
|
Sets the time field with the given value.
field | the given time field. |
---|---|
value | the value to be set for the given time field. |
Return a string representation of this calendar. This method
is intended to be used only for debugging purposes, and the
format of the returned string may vary between implementations.
The returned string may be empty but may not be null
.