public class AbsoluteDateIntervalsList extends TreeSet<AbsoluteDateInterval>
This class represents a list of objects AbsoluteDateInterval
.
It extends a TreeSet of AbsoluteDateInterval
instances ; as the
AbsoluteDateInterval
objects implement the ComparableInterval
class, the list is
an ordered collection of time intervals.
AbsoluteDateInterval
,
TreeSet
,
Serialized FormConstructor and Description |
---|
AbsoluteDateIntervalsList() |
Modifier and Type | Method and Description |
---|---|
AbsoluteDateIntervalsList |
getComplementaryIntervals()
Gets the list of complementary intervals of the given list of intervals.
|
AbsoluteDateInterval |
getInclusiveInterval()
Gets the shortest interval containing all the intervals belonging to the list.
While a date included in at least one of the listed intervals must be contained in this global interval, the opposite is not guaranteed (the inclusive interval can contain dates that do not belong to any listed interval). |
AbsoluteDateIntervalsList |
getIntersectionWith(AbsoluteDateInterval interval)
Returns the intersection between an interval and all the intervals of the list.
|
AbsoluteDateIntervalsList |
getIntervalsContainingDate(AbsoluteDate date)
Gets the
AbsoluteDateIntervalsList containing the specified date. |
AbsoluteDateIntervalsList |
getMergedIntervals()
Merges the intervals of the list that overlap and returns the list of merged intervals.
|
add, addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, spliterator, subSet, subSet, tailSet, tailSet
equals, hashCode, removeAll
containsAll, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
parallelStream, removeIf, stream
public AbsoluteDateIntervalsList getIntervalsContainingDate(AbsoluteDate date)
AbsoluteDateIntervalsList
containing the specified date.
The list can contain zero, one or more AbsoluteDateInterval
.date
- the date included in the time intervalspublic AbsoluteDateInterval getInclusiveInterval()
AbsoluteDateInterval
including all the intervals of the listpublic AbsoluteDateIntervalsList getMergedIntervals()
The list returned should not contain any overlapping intervals.
public AbsoluteDateIntervalsList getIntersectionWith(AbsoluteDateInterval interval)
The list returned can be empty if the provided interval does not intersects any interval of the list.
interval
- the intervalpublic AbsoluteDateIntervalsList getComplementaryIntervals()
AbsoluteDateIntervalsList
including all the complementary intervalsCopyright © 2019 CNES. All Rights Reserved.