Package org.yamcs.utils
Class TimeInterval.FilterOverlappingIterator<T extends TimeInterval>
java.lang.Object
org.yamcs.utils.TimeInterval.FilterOverlappingIterator<T>
- All Implemented Interfaces:
Iterator<T>
- Enclosing class:
- TimeInterval
public static class TimeInterval.FilterOverlappingIterator<T extends TimeInterval>
extends Object
implements Iterator<T>
Filters an input iterator to the intervals that match the given timeInterval
-
Constructor Summary
ConstructorDescriptionFilterOverlappingIterator
(TimeInterval timeInterval, Iterator<T> inputIterator) Creates a new Interator that iterates the elements of inputIterator and outputs only those that overalp with timeInterval. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
FilterOverlappingIterator
Creates a new Interator that iterates the elements of inputIterator and outputs only those that overalp with timeInterval. The timeInterval is considered closed at both ends [start, end] whereas the elements of the inputIterator are considered closed at start but open at end [start, end) The inputIterator is assumed to contain elements sorted by the start.
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<T extends TimeInterval>
-
next
- Specified by:
next
in interfaceIterator<T extends TimeInterval>
-