Class PageUtils
java.lang.Object
org.apache.jena.sparql.service.enhancer.impl.util.PageUtils
Utility methods for working with (fixed-size) pages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intgetIndexInPage(long offset, int pageSize) static longgetIndexInPage(long offset, long pageSize) static longgetPageIndexForOffset(long offset, long pageSize) static longgetPageOffsetForId(long pageId, long pageSize) static LongStreamtouchedPageIndices(com.google.common.collect.Range<Long> range, long pageSize) Return a stream of the page indices touched by the range w.r.t. the page sizestatic NavigableSet<Long>touchedPageIndices(Collection<com.google.common.collect.Range<Long>> ranges, long pageSize)
-
Constructor Details
-
PageUtils
public PageUtils()
-
-
Method Details
-
getPageIndexForOffset
public static long getPageIndexForOffset(long offset, long pageSize) -
getIndexInPage
public static long getIndexInPage(long offset, long pageSize) -
getIndexInPage
public static int getIndexInPage(long offset, int pageSize) -
getPageOffsetForId
public static long getPageOffsetForId(long pageId, long pageSize) -
touchedPageIndices
public static LongStream touchedPageIndices(com.google.common.collect.Range<Long> range, long pageSize) Return a stream of the page indices touched by the range w.r.t. the page size -
touchedPageIndices
public static NavigableSet<Long> touchedPageIndices(Collection<com.google.common.collect.Range<Long>> ranges, long pageSize)
-