@Override public <U> Page<U> map(final Function<? super T, ? extends U> pconverter) { return new DeserializeablePage<>(this.getConvertedContent(pconverter), getPageable(), this.totalElements); }
@Override public boolean hasNext() { return getNumber() + 1 < this.getTotalPages(); }
public PageImpl<T> pageImpl() { return new PageImpl<>(getContent(), PageRequest.of(getNumber(), getSize(), getSort()), getTotalElements()); }
@Override public boolean hasPrevious() { return getNumber() > 0; }
/** * Applies the given {@link Function} to the content of the {@link Chunk}. * * @param converter must not be {@literal null}. * @param <U> type of the entries * @return list of converted entries */ protected <U> List<U> getConvertedContent(final Function<? super T, ? extends U> converter) { Assert.notNull(converter, "Function must not be null!"); return stream().map(converter::apply).collect(Collectors.toList()); } }
public PageImpl<T> pageImpl() { return new PageImpl<>(getContent(), PageRequest.of(getNumber(), getSize(), getSort()), getTotalElements()); }
@Override public boolean hasPrevious() { return getNumber() > 0; }
/** * Applies the given {@link Function} to the content of the {@link Chunk}. * * @param converter must not be {@literal null}. * @param <U> type of the entries * @return list of converted entries */ protected <U> List<U> getConvertedContent(final Function<? super T, ? extends U> converter) { Assert.notNull(converter, "Function must not be null!"); return stream().map(converter::apply).collect(Collectors.toList()); } }
@Override public <U> Page<U> map(final Function<? super T, ? extends U> pconverter) { return new DeserializeablePage<>(this.getConvertedContent(pconverter), getPageable(), this.totalElements); }
@Override public boolean hasNext() { return getNumber() + 1 < this.getTotalPages(); }