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 exhaustedIOException
int startPosition()
next()
has returned true
int endPosition()
next()
has returned true
int startOffset() throws IOException
-1
if offsets are not available
Should only be called after next()
has returned true
IOException
int endOffset() throws IOException
-1
if offsets are not available
Should only be called after next()
has returned true
IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.