Class HolidayCalendar.Builder
java.lang.Object
cloud.opencode.base.date.holiday.HolidayCalendar.Builder
- Enclosing class:
HolidayCalendar
Builder for HolidayCalendar
HolidayCalendar构建器
- Since:
- JDK 25, opencode-base-date V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionaddHoliday(Holiday holiday) Adds a holiday 添加假日addHolidays(Collection<Holiday> holidays) Adds multiple holidays 添加多个假日addSpecialWorkday(LocalDate date) Adds a special workday 添加特殊工作日addSpecialWorkdays(Collection<LocalDate> dates) Adds multiple special workdays 添加多个特殊工作日build()Builds the HolidayCalendar 构建HolidayCalendarSets the calendar name 设置日历名称weekendDays(Set<DayOfWeek> weekendDays) Sets the weekend days 设置周末天数
-
Method Details
-
name
Sets the calendar name 设置日历名称- Parameters:
name- the name | 名称- Returns:
- this builder | 此构建器
-
addHoliday
Adds a holiday 添加假日- Parameters:
holiday- the holiday | 假日- Returns:
- this builder | 此构建器
-
addHolidays
Adds multiple holidays 添加多个假日- Parameters:
holidays- the holidays | 假日集合- Returns:
- this builder | 此构建器
-
addSpecialWorkday
Adds a special workday 添加特殊工作日- Parameters:
date- the date | 日期- Returns:
- this builder | 此构建器
-
addSpecialWorkdays
Adds multiple special workdays 添加多个特殊工作日- Parameters:
dates- the dates | 日期集合- Returns:
- this builder | 此构建器
-
weekendDays
Sets the weekend days 设置周末天数- Parameters:
weekendDays- the weekend days | 周末天数- Returns:
- this builder | 此构建器
-
build
Builds the HolidayCalendar 构建HolidayCalendar- Returns:
- the HolidayCalendar | 假日日历
-