Class WorkdayAdjuster.Builder

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

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

    • days

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

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

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

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

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

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