Class OffsetRange
java.lang.Object
org.apache.lucene.search.matchhighlight.OffsetRange
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
MatchHighlighter.QueryOffsetRange
,Passage
A non-empty range of offset positions.
-
Field Details
-
from
public final int fromStart index, inclusive. -
to
public final int toEnd index, exclusive.
-
-
Constructor Details
-
OffsetRange
public OffsetRange(int from, int to) - Parameters:
from
- Start index, inclusive.to
- End index, exclusive.
-
-
Method Details
-
length
public int length() -
toString
-
equals
-
hashCode
public int hashCode() -
slice
Returns a sub-range of this range (a copy). Subclasses should override and return an appropriate type covariant so that payloads are not lost. -
contains
- Returns:
true
if this range contains or is equal toother
.
-
clone
-