Java – Calendar.Builder Class

Java Calendar.Builder Class methods, constructors, variables available in Java 8 release are listed below. We will publish example program on each methods ASAP.

Constructors in Java Calendar.Builder Class

S.No Constructor & Description
1 Builder()

Constructs a Calendar.Builder.

Methods in Java Calendar.Builder Class

S.No Method & Description
1 Calendar build()

Returns a Calendar built from the parameters set by the setter methods.
2 Calendar.Builder set(int field, int value)

Sets the field parameter to the given value.
3 Calendar.Builder setCalendarType(String type)

Sets the calendar type parameter to the given type.
4 Calendar.Builder setDate(int year, int month, int dayOfMonth)

Sets the date field parameters to the values given by year, month, and dayOfMonth.
5 Calendar.Builder setFields(int... fieldValuePairs)

Sets field parameters to their values given by fieldValuePairs that are pairs of a field and its value.
6 Calendar.Builder setInstant(Date instant)

Sets the instant parameter to the instant value given by a Date.
7 Calendar.Builder setInstant(long instant)

Sets the instant parameter to the given instant value that is a millisecond offset from the Epoch.
8 Calendar.Builder setLenient(boolean lenient)

Sets the lenient mode parameter to the value given by lenient.
9 Calendar.Builder setLocale(Locale locale)

Sets the locale parameter to the given locale.
10 Calendar.Builder setTimeOfDay(int hourOfDay, int minute, int second)

Sets the time of day field parameters to the values given by hourOfDay, minute, and second.
11 Calendar.Builder setTimeOfDay(int hourOfDay, int minute, int second, int millis)

Sets the time of day field parameters to the values given by hourOfDay, minute, second, and millis.
12 Calendar.Builder setTimeZone(TimeZone zone)

Sets the time zone parameter to the given zone.
13 Calendar.Builder 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.
14 Calendar.Builder setWeekDefinition(int firstDayOfWeek, int minimalDaysInFirstWeek)

Sets the week definition parameters to the values given by firstDayOfWeek and minimalDaysInFirstWeek that are used to determine the first week of a year.

Ask your questions in eHowToNow Forum

Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers

  1. Java – ObjDoubleConsumer Interface
  2. Java – RunnableScheduledFuture Interface
  3. Java ArrayList get() method with example
  4. Java – IntPredicate Interface
  5. Java – ConcurrentNavigableMap Interface
  6. Java – IntStream.Builder Interface
  7. Java – DoubleBinaryOperator Interface
  8. How to validate MAC Address using Java Regular Expression
  9. Java – CopyOnWriteArraySet Class
  10. Java – LinkedBlockingDeque Class
  11. Java – IntFunction Interface
  12. Java – CountedCompleter Class
  13. Java RegEx to validate Date – dd/mm/yyyy pattern
  14. Java – TimerTask Class
  15. Java – BlockingDeque Interface

Be the first to comment

Leave a Reply