uk.co.codera.lang.collection.Paginator Maven / Gradle / Ivy
package uk.co.codera.lang.collection;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class Paginator {
private Paginator() {
super();
}
public static List paginate(List original, int size, int offset) {
return original.stream().skip(offset * size).limit(size).collect(Collectors.toCollection(ArrayList::new));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy