Class Slice<T>

java.lang.Object
dk.acto.fafnir.api.model.Slice<T>

public class Slice<T> extends Object
  • Field Details

    • PAGE_SIZE

      public static final Long PAGE_SIZE
  • Constructor Details

    • Slice

      public Slice()
  • Method Details

    • getOffset

      public static Long getOffset(Long pageNumber)
    • lastPage

      public static Long lastPage(Long maxValue)
    • cropPage

      public static Long cropPage(Long purePageNumber, Long maxValue)
    • fromPartial

      public static <T, R> Slice<R> fromPartial(Stream<T> source, Long totalElements, Function<T,R> transform)