Class IntervalIterator

    • Field Detail

      • NO_MORE_INTERVALS

        public static final int NO_MORE_INTERVALS
        When returned from nextInterval(), indicates that there are no more matching intervals on the current document
        See Also:
        Constant Field Values
    • Constructor Detail

      • IntervalIterator

        public IntervalIterator()
    • Method Detail

      • start

        public abstract int start()
        The start of the current interval

        Returns -1 if nextInterval() has not yet been called and NO_MORE_INTERVALS once the iterator is exhausted.

      • end

        public abstract int end()
        The end of the current interval

        Returns -1 if nextInterval() has not yet been called and NO_MORE_INTERVALS once the iterator is exhausted.

      • gaps

        public abstract int gaps()
        The number of gaps within the current interval

        Note that this returns the number of gaps between the immediate sub-intervals of this interval, and does not include the gaps inside those sub-intervals.

        Should not be called before nextInterval(), or after it has returned NO_MORE_INTERVALS

      • width

        public int width()
        The width of the current interval
      • matchCost

        public abstract float matchCost()
        An indication of the average cost of iterating over all intervals in a document
        See Also:
        TwoPhaseIterator.matchCost()