Package io.quarkus.panache.common
Class Range
java.lang.Object
io.quarkus.panache.common.Range
Utility class to represent ranging information. Range instances are immutable.
Usage:
Range range = Range.of(0, 5);
Note that due to the end index being inclusive, it's impossible to write empty ranges.-
Constructor Details
-
Range
public Range(int startIndex, int lastIndex) Creates a new range- Parameters:
startIndex- the start index to include, 0-basedlastIndex- the end index to include, 0-based
-
-
Method Details
-
of
Creates a new range- Parameters:
startIndex- the start index to include, 0-basedlastIndex- the end index to include, 0-based
-
getStartIndex
public int getStartIndex()- Returns:
- the start index to include, 0-based
-
getLastIndex
public int getLastIndex()- Returns:
- the last index to include, 0-based
-