Calendar.Builder (Java SE 26 & JDK 26)
- Enclosing class:
Calendar
-
Constructor Summary
Constructors
Builder()Constructs a
Calendar.Builder. -
Method Summary
build()Returns a
Calendarbuilt from the parameters set by the setter methods.set(int field, int value) Sets the
fieldparameter to the givenvalue.Sets the calendar type parameter to the given
type.setDate(int year, int month, int dayOfMonth) Sets the date field parameters to the values given by
year,month, anddayOfMonth.setFields(int... fieldValuePairs) Sets field parameters to their values given by
fieldValuePairsthat are pairs of a field and its value.setInstant(long instant) Sets the instant parameter to the given
instantvalue that is a millisecond offset from the Epoch.Sets the instant parameter to the
instantvalue given by aDate.setLenient(boolean lenient) Sets the lenient mode parameter to the value given by
lenient.Sets the locale parameter to the given
locale.setTimeOfDay(int hourOfDay, int minute, int second) Sets the time of day field parameters to the values given by
hourOfDay,minute, andsecond.setTimeOfDay(int hourOfDay, int minute, int second, int millis) Sets the time of day field parameters to the values given by
hourOfDay,minute,second, andmillis.Sets the time zone parameter to the given
zone.setWeekDate(int weekYear, int weekOfYear, int dayOfWeek) Sets the week-based date parameters to the values with the given date specifiers - week year, week of year, and day of week.
setWeekDefinition(int firstDayOfWeek, int minimalDaysInFirstWeek) Sets the week definition parameters to the values given by
firstDayOfWeekandminimalDaysInFirstWeekthat are used to determine the first week of a year.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitCreates and returns a copy of this object.
booleanIndicates whether some other object is "equal to" this one.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.intReturns a hash code value for this object.
final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
Returns a string representation of the object.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Constructor Details
-
Builder
-
-
Method Details
-
setInstant
-
setInstant
-
set
-
setFields
-
setDate
-
setTimeOfDay
-
setTimeOfDay
-
setWeekDate
-
setTimeZone
-
setLenient
-
setCalendarType
-
setLocale
-
setWeekDefinition
-
build
-