Interface TimeInterval


  • public interface TimeInterval
    Interface representing a closed time interval i.e. [a, b], possibly of infinite length.
    Since:
    13.1
    Author:
    Romain Serra
    See Also:
    AbsoluteDate
    • Method Detail

      • getStartDate

        AbsoluteDate getStartDate()
        Getter for the left end of the interval.
        Returns:
        left end
      • getEndDate

        AbsoluteDate getEndDate()
        Getter for the right end of the interval.
        Returns:
        right end
      • duration

        default double duration()
        Computes the interval length in seconds.
        Returns:
        duration
      • contains

        default boolean contains​(TimeStamped timeStamped)
        Method returning true if and only if the dated input is contained within the closed interval.
        Parameters:
        timeStamped - time stamped object
        Returns:
        boolean on inclusion
      • contains

        default boolean contains​(TimeInterval interval)
        Method returning true if and only if input (also a closed time interval) contains the instance.
        Parameters:
        interval - time interval
        Returns:
        boolean on inclusion
      • intersects

        default boolean intersects​(TimeInterval interval)
        Method returning true if and only if input (also a closed time interval) intersects the instance.
        Parameters:
        interval - time interval
        Returns:
        boolean on intersection
      • of

        static TimeInterval of​(AbsoluteDate date,
                               AbsoluteDate otherDate)
        Create instance from two dates in arbitrary order.
        Parameters:
        date - date
        otherDate - other date
        Returns:
        time interval