public final class GregorianTimeZone extends GregorianCalendar
Calendar.BuilderAD, BCALL_STYLES, 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, LONG, LONG_FORMAT, LONG_STANDALONE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NARROW_FORMAT, NARROW_STANDALONE, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SHORT, SHORT_FORMAT, SHORT_STANDALONE, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET| Constructor and Description |
|---|
GregorianTimeZone()
Default Constructor.
|
GregorianTimeZone(Calendar calendar)
Creates a new Gregorian date from a given
java.util.Calendar. |
GregorianTimeZone(Date date)
Creates a new Gregorian date from a given
java.util.Date. |
GregorianTimeZone(TimeZone timezone)
Creates a new Gregorian time zone from a given time zone.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeFields()
Overwrites GregorianCalendar.computeFields(), to disable all date and
time fields.
|
boolean |
equals(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.
|
String |
toString()
Formats a date as a string in a locale-independent format.
|
add, clone, computeTime, from, getActualMaximum, getActualMinimum, getCalendarType, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, getWeeksInWeekYear, getWeekYear, isLeapYear, isWeekDateSupported, roll, roll, setGregorianChange, setTimeZone, setWeekDate, toZonedDateTimeafter, before, clear, clear, compareTo, complete, get, getAvailableCalendarTypes, getAvailableLocales, getDisplayName, getDisplayNames, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, internalGet, isLenient, isSet, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, toInstantpublic GregorianTimeZone()
public GregorianTimeZone(Date date)
java.util.Date.date - the date for the new calendarpublic GregorianTimeZone(Calendar calendar)
java.util.Calendar.calendar - the original calendar for the new calendarpublic GregorianTimeZone(TimeZone timezone)
timezone - the time zonepublic void set(int field,
int value)
set in class Calendarfield - the given calendar field.value - the value to be set for the given calendar field.Calendar.set(int, int)public String toString()
toString in class CalendarYYYY-MM-DD.Object.toString()protected void computeFields()
computeFields in class GregorianCalendarCalendar.computeFields()public boolean equals(Object object)
equals in class GregorianCalendarobject - the reference object with which to compare.true if this object is the same as the object
argument; false otherwise.Object.equals(java.lang.Object)public int hashCode()
hashCode in class GregorianCalendarObject.hashCode()Copyright © 2005–2020. All rights reserved.