Package net.time4j.engine
Interface TimeLine<T>
- Type Parameters:
T
- generic type of time points
- All Superinterfaces:
Comparator<T>
- All Known Implementing Classes:
TimeAxis
Represents a time axis where a point in time can be moved forward or backward.
As step width, the associated time axis will usually use the smallest registered time unit.
- Since:
- 2.0
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptionYields the maximum of this time axis.Yields the minimum of this time axis.default boolean
Determines if this timeline is calendrical or not.stepBackwards(T timepoint)
Move given point in time backwards by one step.stepForward(T timepoint)
Move given point in time forward by one step.Methods inherited from interface java.util.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
stepForward
Move given point in time forward by one step.
- Parameters:
timepoint
- point in time to be moved forward- Returns:
- new point in time one step after given argument
or
null
if applied on the maximum of timeline - Since:
- 2.0
-
stepBackwards
Move given point in time backwards by one step.
- Parameters:
timepoint
- point in time to be moved backwards- Returns:
- new point in time one step before given argument
or
null
if applied on the minimum of timeline - Since:
- 2.0
-
getMinimum
T getMinimum()Yields the minimum of this time axis.
Implementors of this interface are required to override this method otherwise an
UnsupportedOperationException
will happen at runtime.- Returns:
- earliest possible time point
- Since:
- 4.18
-
getMaximum
T getMaximum()Yields the maximum of this time axis.
Implementors of this interface are required to override this method otherwise an
UnsupportedOperationException
will happen at runtime.- Returns:
- latest possible time point
- Since:
- 4.18
-
isCalendrical
default boolean isCalendrical()Determines if this timeline is calendrical or not.- Returns:
- boolean
- Since:
- 3.36/4.31
- See Also:
CalendarDate
-