Package org.orekit.time
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 Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
contains(TimeInterval interval)
Method returning true if and only if input (also a closed time interval) contains the instance.default boolean
contains(TimeStamped timeStamped)
Method returning true if and only if the dated input is contained within the closed interval.default double
duration()
Computes the interval length in seconds.AbsoluteDate
getEndDate()
Getter for the right end of the interval.AbsoluteDate
getStartDate()
Getter for the left end of the interval.default boolean
intersects(TimeInterval interval)
Method returning true if and only if input (also a closed time interval) intersects the instance.static TimeInterval
of(AbsoluteDate date, AbsoluteDate otherDate)
Create instance from two dates in arbitrary order.
-
-
-
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
- dateotherDate
- other date- Returns:
- time interval
-
-