Class PageUtils
java.lang.Object
org.apache.jena.sparql.service.enhancer.impl.util.PageUtils
Utility methods for working with (fixed-size) pages.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
getIndexInPage
(long offset, int pageSize) static long
getIndexInPage
(long offset, long pageSize) static long
getPageIndexForOffset
(long offset, long pageSize) static long
getPageOffsetForId
(long pageId, long pageSize) 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.static 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)
-