Interface Movable.MovingCondition

  • Enclosing interface:
    Movable

    public static interface Movable.MovingCondition
    Describes how a holiday, that implements the Movable interface, can be moved from a day of a week to another day of a week.

    Examples:

    • A holiday that falls on a Sunday (weekday) can be moved to the next (with) Monday (substitute).
    • A holiday that falls on a Saturday (weekday) can be moved to the previous (with) Friday (substitute).
    • Method Detail

      • weekday

        DayOfWeek weekday()
        Represents the day of the week as trigger to move the holiday if the holiday would occur oh this weekday.
        Returns:
        the weekday on which the holiday will be moved to another weekday
      • with

        Movable.MovingCondition.With with()
        Represents if the holiday will be moved to the previous or next weekday.
        Returns:
        the rule in which direction (next or previous) the holiday will be moved.
      • substitute

        DayOfWeek substitute()
        Represents the substitution weekday for the holiday
        Returns:
        the weekday the holiday will be moved to