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
Constructors Constructor Description FilterOverlappingIterator(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Tnext()-
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 Detail
-
FilterOverlappingIterator
public FilterOverlappingIterator(TimeInterval timeInterval, Iterator<T> inputIterator)
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 Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<T extends TimeInterval>
-
next
public T next()
- Specified by:
nextin interfaceIterator<T extends TimeInterval>
-
-