2021-10-13 12:25:32 +02:00
|
|
|
package it.cavallium.dbengine.lucene;
|
2021-09-20 18:20:59 +02:00
|
|
|
|
|
|
|
public class SinglePageLimits implements PageLimits {
|
|
|
|
|
|
|
|
private final int firstPageLimit;
|
|
|
|
|
|
|
|
public SinglePageLimits() {
|
|
|
|
this(DEFAULT_MIN_ITEMS_PER_PAGE);
|
|
|
|
}
|
|
|
|
|
|
|
|
public SinglePageLimits(int firstPageLimit) {
|
|
|
|
this.firstPageLimit = firstPageLimit;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getPageLimit(int pageIndex) {
|
|
|
|
if (pageIndex == 0) {
|
|
|
|
return firstPageLimit;
|
|
|
|
} else {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|