class MinimizingConjunctionMatchesIterator extends java.lang.Object implements IntervalMatchesIterator
| Modifier and Type | Field and Description |
|---|---|
private boolean |
cached |
(package private) IntervalIterator |
iterator |
private java.util.List<CachingMatchesIterator> |
subs |
| Constructor and Description |
|---|
MinimizingConjunctionMatchesIterator(IntervalIterator iterator,
java.util.List<MatchesIterator> subs) |
| Modifier and Type | Method and Description |
|---|---|
int |
endOffset()
The ending offset of the current match, or
-1 if offsets are not available
Should only be called after MatchesIterator.next() has returned true |
int |
endPosition()
The end position of the current match
Should only be called after
MatchesIterator.next() has returned true |
int |
gaps()
The number of top-level gaps inside the current match
|
Query |
getQuery()
Returns the Query causing the current match
If this
MatchesIterator has been returned from a MatchesIterator.getSubMatches()
call, then returns a TermQuery equivalent to the current match
Should only be called after MatchesIterator.next() has returned true |
MatchesIterator |
getSubMatches()
Returns a MatchesIterator that iterates over the positions and offsets of individual
terms within the current match
Returns
null if there are no submatches (ie the current iterator is at the
leaf level)
Should only be called after MatchesIterator.next() has returned true |
boolean |
next()
Advance the iterator to the next match position
|
int |
startOffset()
The starting offset of the current match, or
-1 if offsets are not available
Should only be called after MatchesIterator.next() has returned true |
int |
startPosition()
The start position of the current match
Should only be called after
MatchesIterator.next() has returned true |
final IntervalIterator iterator
private final java.util.List<CachingMatchesIterator> subs
private boolean cached
MinimizingConjunctionMatchesIterator(IntervalIterator iterator, java.util.List<MatchesIterator> subs)
public boolean next()
throws java.io.IOException
MatchesIteratornext in interface MatchesIteratortrue if matches have not been exhaustedjava.io.IOExceptionpublic int startPosition()
MatchesIteratorMatchesIterator.next() has returned truestartPosition in interface MatchesIteratorpublic int endPosition()
MatchesIteratorMatchesIterator.next() has returned trueendPosition in interface MatchesIteratorpublic int startOffset()
throws java.io.IOException
MatchesIterator-1 if offsets are not available
Should only be called after MatchesIterator.next() has returned truestartOffset in interface MatchesIteratorjava.io.IOExceptionpublic int endOffset()
throws java.io.IOException
MatchesIterator-1 if offsets are not available
Should only be called after MatchesIterator.next() has returned trueendOffset in interface MatchesIteratorjava.io.IOExceptionpublic int gaps()
IntervalMatchesIteratorgaps in interface IntervalMatchesIteratorpublic MatchesIterator getSubMatches() throws java.io.IOException
MatchesIteratornull if there are no submatches (ie the current iterator is at the
leaf level)
Should only be called after MatchesIterator.next() has returned truegetSubMatches in interface MatchesIteratorjava.io.IOExceptionpublic Query getQuery()
MatchesIteratorMatchesIterator has been returned from a MatchesIterator.getSubMatches()
call, then returns a TermQuery equivalent to the current match
Should only be called after MatchesIterator.next() has returned truegetQuery in interface MatchesIterator