Cutting it to Pages
I was working on representing a large List of information on a number of different pages, and a colleague of mine suggested that I try to make a generic method for the task I was trying to perform: private <T> List<List<T>> listSplitter(List<T> originalList, int splitCount) { List<List<T>> listOfLists= new ArrayList<>(); listOfLists.add(new ArrayList<>()); int originalListSize = … Read more