Package net.time4j

Interface OrdinalWeekdayElement

All Superinterfaces:
AdjustableElement<Integer,​PlainDate>, ChronoElement<Integer>, Comparator<ChronoDisplay>, ZonalElement<Integer>

public interface OrdinalWeekdayElement extends AdjustableElement<Integer,​PlainDate>

The element for the ordinal weekday in month.

An instance can be obtained using the expression PlainDate.WEEKDAY_IN_MONTH. This interface inherits from AdjustableElement and offers additional operator for setting the weekday in month.

Author:
Meno Hochschild
  • Method Details

    • setToFirst

      ElementOperator<PlainDate> setToFirst(Weekday dayOfWeek)

      Defines an operator which moves a date to the first given weekday in month.

      Parameters:
      dayOfWeek - first day of week in month
      Returns:
      operator directly applicable also on PlainTimestamp
    • setToSecond

      ElementOperator<PlainDate> setToSecond(Weekday dayOfWeek)

      Defines an operator which moves a date to the second given weekday in month.

      Parameters:
      dayOfWeek - second day of week in month
      Returns:
      operator directly applicable also on PlainTimestamp
    • setToThird

      ElementOperator<PlainDate> setToThird(Weekday dayOfWeek)

      Defines an operator which moves a date to the third given weekday in month.

      Parameters:
      dayOfWeek - third day of week in month
      Returns:
      operator directly applicable also on PlainTimestamp
    • setToFourth

      ElementOperator<PlainDate> setToFourth(Weekday dayOfWeek)

      Defines an operator which moves a date to the fourth given weekday in month.

      Parameters:
      dayOfWeek - fourth day of week in month
      Returns:
      operator directly applicable also on PlainTimestamp
    • setToLast

      ElementOperator<PlainDate> setToLast(Weekday dayOfWeek)

      Defines an operator which moves a date to the last given weekday in month.

      Parameters:
      dayOfWeek - last day of week in month
      Returns:
      operator directly applicable also on PlainTimestamp
    • setTo

      default ElementOperator<PlainDate> setTo(int ordinal, Weekday dayOfWeek)

      Defines an operator which moves a date to the given ordinal weekday in month.

      If given ordinal number is Integer.MAX_VALUE then the last weekday in month will be determined. Note that only the values 1-4 can give the guarantee that the current month will not be changed.

      Parameters:
      ordinal - ordinal number
      dayOfWeek - last day of week in month
      Returns:
      operator directly applicable also on PlainTimestamp
      Since:
      4.1