Class BusinessDayAdjuster.Builder

java.lang.Object
cloud.opencode.base.date.adjuster.BusinessDayAdjuster.Builder
Enclosing class:
BusinessDayAdjuster

public static class BusinessDayAdjuster.Builder extends Object
Builder for BusinessDayAdjuster BusinessDayAdjuster构建器
Since:
JDK 25, opencode-base-date V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Method Details

    • days

      public BusinessDayAdjuster.Builder days(int days)
      Sets the number of days to adjust 设置要调整的天数
      Parameters:
      days - the days | 天数
      Returns:
      this builder | 此构建器
    • weekendDays

      public BusinessDayAdjuster.Builder weekendDays(Set<DayOfWeek> weekendDays)
      Sets the weekend days 设置周末天数
      Parameters:
      weekendDays - the weekend days | 周末天数
      Returns:
      this builder | 此构建器
    • middleEastWeekend

      public BusinessDayAdjuster.Builder middleEastWeekend()
      Sets the weekend days as Friday and Saturday (Middle East) 设置周末为周五和周六(中东)
      Returns:
      this builder | 此构建器
    • holidays

      public BusinessDayAdjuster.Builder holidays(Predicate<LocalDate> holidayPredicate)
      Sets the holiday predicate 设置假日谓词
      Parameters:
      holidayPredicate - the holiday predicate | 假日谓词
      Returns:
      this builder | 此构建器
    • holidays

      public BusinessDayAdjuster.Builder holidays(Set<LocalDate> holidays)
      Sets the holidays from a set 从集合设置假日
      Parameters:
      holidays - the holidays | 假日集合
      Returns:
      this builder | 此构建器
    • specialWorkdays

      public BusinessDayAdjuster.Builder specialWorkdays(Predicate<LocalDate> specialWorkdayPredicate)
      Sets the special workday predicate 设置特殊工作日谓词
      Parameters:
      specialWorkdayPredicate - the special workday predicate | 特殊工作日谓词
      Returns:
      this builder | 此构建器
    • specialWorkdays

      public BusinessDayAdjuster.Builder specialWorkdays(Set<LocalDate> specialWorkdays)
      Sets the special workdays from a set 从集合设置特殊工作日
      Parameters:
      specialWorkdays - the special workdays | 特殊工作日集合
      Returns:
      this builder | 此构建器
    • build

      public BusinessDayAdjuster build()
      Builds the BusinessDayAdjuster 构建BusinessDayAdjuster
      Returns:
      the BusinessDayAdjuster | BusinessDayAdjuster