Package org.aksw.commons.util.page
Class PageUtils
- java.lang.Object
-
- org.aksw.commons.util.page.PageUtils
-
public class PageUtils extends Object
Utility methods for working with (fixed-size) pages.- Author:
- raven
-
-
Constructor Summary
Constructors Constructor Description PageUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetIndexInPage(long offset, int pageSize)static longgetIndexInPage(long offset, long pageSize)static longgetPageIndexForOffset(long offset, long pageSize)static longgetPageOffsetForId(long pageId, long pageSize)static java.util.stream.LongStreamtouchedPageIndices(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)
-
-
-
Method Detail
-
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 java.util.stream.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)
-
-