Interface TimeLine<T>

Type Parameters:
T - generic type of time points
All Superinterfaces:
Comparator<T>
All Known Implementing Classes:
TimeAxis

public interface TimeLine<T> extends Comparator<T>

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 Details

    • stepForward

      T stepForward(T timepoint)

      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

      T stepBackwards(T timepoint)

      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