Class TimeSpanMap.Span<S>

  • Type Parameters:
    S - Type of the data.
    Enclosing class:
    TimeSpanMap<T>

    public static class TimeSpanMap.Span<S>
    extends Object
    Holder for one time span.

    This data type is dual to TimeSpanMap.Transition, it is focused on one valid data, and gives access to surrounding transition dates whereas TimeSpanMap.Transition is focused on one transition date, and gives access to surrounding valid data.

    Since:
    9.3
    • Method Detail

      • getData

        public S getData()
        Get the data valid during this time span.
        Returns:
        data valid during this time span
      • previous

        public TimeSpanMap.Span<S> previous()
        Get the previous time span.
        Returns:
        previous time span, or null if this time span was the first one
        Since:
        11.1
      • next

        public TimeSpanMap.Span<S> next()
        Get the next time span.
        Returns:
        next time span, or null if this time span was the last one
        Since:
        11.1
      • getStartTransition

        public TimeSpanMap.Transition<S> getStartTransition()
        Get the transition at start of this time span.
        Returns:
        transition at start of this time span (null if span extends to past infinity)
        Since:
        11.1
        See Also:
        getStart()
      • getEndTransition

        public TimeSpanMap.Transition<S> getEndTransition()
        Get the transition at end of this time span.
        Returns:
        transition at end of this time span (null if span extends to future infinity)
        Since:
        11.1
        See Also:
        getEnd()