public abstract class OffsetsEnum extends Object implements Comparable<OffsetsEnum>, Closeable
FieldHighlighter.
 It is advanced and is placed in a priority queue by
 FieldHighlighter.highlightOffsetsEnums(OffsetsEnum) based on the start offset.| Modifier and Type | Class and Description | 
|---|---|
| static class  | OffsetsEnum.MultiOffsetsEnumA view over several OffsetsEnum instances, merging them in-place | 
| static class  | OffsetsEnum.OfMatchesIteratorBased on a  MatchesIterator; does not look at submatches. | 
| static class  | OffsetsEnum.OfMatchesIteratorWithSubsBased on a  MatchesIteratorwith submatches. | 
| static class  | OffsetsEnum.OfPostingsBased on a  PostingsEnum-- the typical/standard OE impl. | 
| Modifier and Type | Field and Description | 
|---|---|
| static OffsetsEnum | EMPTYEmpty enumeration | 
| Constructor and Description | 
|---|
| OffsetsEnum() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close() | 
| int | compareTo(OffsetsEnum other) | 
| abstract int | endOffset() | 
| abstract int | freq()An estimate of the number of occurrences of this term/OffsetsEnum. | 
| abstract BytesRef | getTerm()The term at this position. | 
| abstract boolean | nextPosition()Advances to the next position and returns true, or if can't then returns false. | 
| abstract int | startOffset() | 
| String | toString() | 
public static final OffsetsEnum EMPTY
public int compareTo(OffsetsEnum other)
compareTo in interface Comparable<OffsetsEnum>public abstract boolean nextPosition()
                              throws IOException
IOExceptionpublic abstract int freq()
                  throws IOException
IOExceptionpublic abstract BytesRef getTerm() throws IOException
IOExceptionPassage.getMatchTerms()public abstract int startOffset()
                         throws IOException
IOExceptionpublic abstract int endOffset()
                       throws IOException
IOExceptionpublic void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.