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 TypeMethodDescriptionforward()
Sets a forward calculation window.default T
Computes until all times are found.Limits the calculation window to the givenDuration
.default T
oneDay()
Limits the time window to the next 24 hours.reverse()
Sets a reverse calculation window.sameWindowAs
(WindowParameter<?> w) Uses the same window as given in theWindowParameter
.
-
Method Details
-
limit
Limits the calculation window to the givenDuration
.- Parameters:
duration
- Duration of the calculation window. A negative duration sets a reverse time window, giving result times in the past.- Returns:
- itself
-
oneDay
Limits the time window to the next 24 hours.- Returns:
- itself
-
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 theWindowParameter
.Changes to the source parameter will not affect this parameter, though.
- Parameters:
w
-WindowParameter
to be used.- Returns:
- itself
- Since:
- 3.11
-