org.orekit.utils
Class AbsoluteDateIntervalsList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.TreeSet<AbsoluteDateInterval>
              extended by org.orekit.utils.AbsoluteDateIntervalsList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<AbsoluteDateInterval>, Collection<AbsoluteDateInterval>, NavigableSet<AbsoluteDateInterval>, Set<AbsoluteDateInterval>, SortedSet<AbsoluteDateInterval>

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.

Since:
1.1
Version:
$Id: AbsoluteDateIntervalsList.java 6012 2012-08-29 13:58:40Z TournebizeJ $
Author:
Tiziana Sabatini
See Also:
AbsoluteDateInterval, TreeSet, Serialized Form
Concurrency :
not thread-safe
Concurrency comment :
thread safety is not required for this class. And, TreeSet is not thread-safe.

Constructor Summary
AbsoluteDateIntervalsList()
           
 
Method Summary
 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 getIntervalsContainingDate(AbsoluteDate date)
          Gets the AbsoluteDateIntervalsList containing the specified date.
 
Methods inherited from class java.util.TreeSet
add, addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSet
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

AbsoluteDateIntervalsList

public AbsoluteDateIntervalsList()
Method Detail

getIntervalsContainingDate

public AbsoluteDateIntervalsList getIntervalsContainingDate(AbsoluteDate date)
Gets the AbsoluteDateIntervalsList containing the specified date. The list can contain zero, one or more AbsoluteDateInterval.

Parameters:
date - the date included in the time intervals
Returns:
a list of time intervals containing the input date.

getInclusiveInterval

public 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).

Returns:
an AbsoluteDateInterval including all the intervals of the list

getComplementaryIntervals

public AbsoluteDateIntervalsList getComplementaryIntervals()
Gets the list of complementary intervals of the given list of intervals.

Returns:
an AbsoluteDateIntervalsList including all the complementary intervals


Copyright © 2016 CNES. All Rights Reserved.