Interface WindowParameter<T>

Type Parameters:
T - Type of the final builder
All Known Subinterfaces:
MoonTimes.Parameters, SunTimes.Parameters
All Known Implementing Classes:
BaseBuilder

public interface WindowParameter<T>
Time window based parameters.

Use them to give information about the desired time window. If ommitted, a forward window of 365 days is assumed.

Since:
3.11
  • Method Summary

    Modifier and Type
    Method
    Description
    Sets a forward calculation window.
    default T
    Computes until all times are found.
    limit(Duration duration)
    Limits the calculation window to the given Duration.
    default T
    Limits the time window to the next 24 hours.
    Sets a reverse calculation window.
    Uses the same window as given in the WindowParameter.
  • Method Details

    • limit

      T limit(Duration duration)
      Limits the calculation window to the given Duration.
      Parameters:
      duration - Duration of the calculation window. A negative duration sets a reverse time window, giving result times in the past.
      Returns:
      itself
    • oneDay

      default T oneDay()
      Limits the time window to the next 24 hours.
      Returns:
      itself
    • fullCycle

      default T fullCycle()
      Computes until all times are found.

      This is the default.

      Returns:
      itself
    • reverse

      Sets a reverse calculation window. It will end at the given date.
      Returns:
      itself
      Since:
      3.11
    • forward

      Sets a forward calculation window. It will start at the given date.

      This is the default.

      Returns:
      itself
      Since:
      3.11
    • sameWindowAs

      Uses the same window as given in the WindowParameter.

      Changes to the source parameter will not affect this parameter, though.

      Parameters:
      w - WindowParameter to be used.
      Returns:
      itself
      Since:
      3.11