io.quarkus.panache.common.Range Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-panache-common Show documentation
Show all versions of quarkus-panache-common Show documentation
An opinionated approach to make Hibernate as easy as possible
package io.quarkus.panache.common;
/**
*
* Utility class to represent ranging information. Range instances are immutable.
*
*
*
* Usage:
*
*
*
* Range range = Range.of(0, 5);
*
*/
public class Range {
private final int startIndex;
private final int lastIndex;
public Range(int startIndex, int lastIndex) {
this.startIndex = startIndex;
this.lastIndex = lastIndex;
}
public static Range of(int startIndex, int lastIndex) {
return new Range(startIndex, lastIndex);
}
public int getStartIndex() {
return startIndex;
}
public int getLastIndex() {
return lastIndex;
}
}