Class RepeatingIntervalsSource.DuplicateMatchesIterator
- java.lang.Object
-
- org.apache.lucene.queries.intervals.RepeatingIntervalsSource.DuplicateMatchesIterator
-
- All Implemented Interfaces:
IntervalMatchesIterator,MatchesIterator
- Enclosing class:
- RepeatingIntervalsSource
private static class RepeatingIntervalsSource.DuplicateMatchesIterator extends java.lang.Object implements IntervalMatchesIterator
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleancached(package private) java.util.List<IntervalMatchesIterator>subs
-
Constructor Summary
Constructors Modifier Constructor Description privateDuplicateMatchesIterator(java.util.List<IntervalMatchesIterator> subs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static IntervalMatchesIteratorbuild(java.util.List<IntervalMatchesIterator> subs)intendOffset()The ending offset of the current match, or-1if offsets are not available Should only be called afterMatchesIterator.next()has returnedtrueintendPosition()The end position of the current match Should only be called afterMatchesIterator.next()has returnedtrueintgaps()The number of top-level gaps inside the current matchQuerygetQuery()Returns the Query causing the current match If thisMatchesIteratorhas been returned from aMatchesIterator.getSubMatches()call, then returns aTermQueryequivalent to the current match Should only be called afterMatchesIterator.next()has returnedtrueMatchesIteratorgetSubMatches()Returns a MatchesIterator that iterates over the positions and offsets of individual terms within the current match Returnsnullif there are no submatches (ie the current iterator is at the leaf level) Should only be called afterMatchesIterator.next()has returnedtruebooleannext()Advance the iterator to the next match positionintstartOffset()The starting offset of the current match, or-1if offsets are not available Should only be called afterMatchesIterator.next()has returnedtrueintstartPosition()The start position of the current match Should only be called afterMatchesIterator.next()has returnedtrueintwidth()The width of the current match
-
-
-
Field Detail
-
subs
java.util.List<IntervalMatchesIterator> subs
-
cached
boolean cached
-
-
Constructor Detail
-
DuplicateMatchesIterator
private DuplicateMatchesIterator(java.util.List<IntervalMatchesIterator> subs) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
build
static IntervalMatchesIterator build(java.util.List<IntervalMatchesIterator> subs) throws java.io.IOException
- Throws:
java.io.IOException
-
next
public boolean next() throws java.io.IOExceptionDescription copied from interface:MatchesIteratorAdvance the iterator to the next match position- Specified by:
nextin interfaceMatchesIterator- Returns:
trueif matches have not been exhausted- Throws:
java.io.IOException
-
startPosition
public int startPosition()
Description copied from interface:MatchesIteratorThe start position of the current match Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
startPositionin interfaceMatchesIterator
-
endPosition
public int endPosition()
Description copied from interface:MatchesIteratorThe end position of the current match Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
endPositionin interfaceMatchesIterator
-
startOffset
public int startOffset() throws java.io.IOExceptionDescription copied from interface:MatchesIteratorThe starting offset of the current match, or-1if offsets are not available Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
startOffsetin interfaceMatchesIterator- Throws:
java.io.IOException
-
endOffset
public int endOffset() throws java.io.IOExceptionDescription copied from interface:MatchesIteratorThe ending offset of the current match, or-1if offsets are not available Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
endOffsetin interfaceMatchesIterator- Throws:
java.io.IOException
-
getSubMatches
public MatchesIterator getSubMatches() throws java.io.IOException
Description copied from interface:MatchesIteratorReturns a MatchesIterator that iterates over the positions and offsets of individual terms within the current match Returnsnullif there are no submatches (ie the current iterator is at the leaf level) Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
getSubMatchesin interfaceMatchesIterator- Throws:
java.io.IOException
-
getQuery
public Query getQuery()
Description copied from interface:MatchesIteratorReturns the Query causing the current match If thisMatchesIteratorhas been returned from aMatchesIterator.getSubMatches()call, then returns aTermQueryequivalent to the current match Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
getQueryin interfaceMatchesIterator
-
gaps
public int gaps()
Description copied from interface:IntervalMatchesIteratorThe number of top-level gaps inside the current match- Specified by:
gapsin interfaceIntervalMatchesIterator- See Also:
IntervalIterator.gaps()
-
width
public int width()
Description copied from interface:IntervalMatchesIteratorThe width of the current match- Specified by:
widthin interfaceIntervalMatchesIterator- See Also:
IntervalIterator.width()
-
-