AI-generated Key Takeaways
-
The SearchResult.MatchRange class provides the position range of matching information.
-
MatchRange objects represent finite ranges where the left side is always less than or equal to the right side.
-
A new immutable range is created using the MatchRange constructor with a start and end integer, representing an inclusive start and exclusive end.
-
Methods are available to get the start and end points of the range.
Class providing the position range of matching information.
All ranges are finite, and the left side of the range is always <= the
right side of the range.
Example: MatchRange(0, 100) represents hundred ints from 0 to 99."
Public Constructor Summary
|
MatchRange(int start, int end)
Creates a new immutable range.
|
Public Method Summary
| boolean | |
| int |
getEnd()
Gets the end point (exclusive).
|
| int |
getStart()
Gets the start point (inclusive).
|
| int |
hashCode()
|
| String |
toString()
|
Inherited Method Summary
Public Constructors
public MatchRange (int start, int end)
Creates a new immutable range.
The endpoints are [start, end); that is the range is bounded.
start must be lesser or equal to end.
Parameters
| start | The start point (inclusive) |
|---|---|
| end | The end point (exclusive) |
Public Methods
public boolean equals (Object other)
public int getEnd ()
Gets the end point (exclusive).
public int getStart ()
Gets the start point (inclusive).