Class TimeInterval.FilterOverlappingIterator<T extends TimeInterval>

  • 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 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.