public interface MatchesIterator
next() until it returns false, retrieving
positions and/or offsets after each call. You should not call the position or offset methods
before next() has been called, or after next() has returned false.
Matches are ordered by start position, and then by end position. Match intervals may overlap.Weight.matches(LeafReaderContext, int)| 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 next() has returned true |
int |
endPosition()
The end position of the current match
Should only be called after
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 next() has returned true |
int |
startPosition()
The start position of the current match
Should only be called after
next() has returned true |
boolean next()
throws IOException
true if matches have not been exhaustedIOExceptionint startPosition()
next() has returned trueint endPosition()
next() has returned trueint startOffset()
throws IOException
-1 if offsets are not available
Should only be called after next() has returned trueIOExceptionint endOffset()
throws IOException
-1 if offsets are not available
Should only be called after next() has returned trueIOExceptionCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.