List of utility methods to do List Sub List
List | subList(final List Returns a List containing the elements of the given List from offset and only the given amount. if (list == null) { return null; if (offset >= list.size()) { return Collections.emptyList(); int toPos = offset + amount; if (toPos >= list.size()) { ... |
java.util.List | subList(final List sub List if (null == list || list.isEmpty()) { return new ArrayList<T>(); int size = list.size(); int min = startIndex; int max = endIndex == -1 ? size : size < endIndex ? size : endIndex; if (max < min) { min = min ^ max; ... |
List | subList(final List sub List List<T> result = new ArrayList<T>(indices.length); for (int index : indices) { result.add(source.get(index)); return result; |
List | sublist(LinkedHashSet sublist Iterator<T> iterator = base.iterator(); int index = 0; final List<T> result = new ArrayList<T>(); while (iterator.hasNext() && index < (start + count)) { T next = iterator.next(); if (index < start) { index++; continue; ... |
List | subList(List list, int start, int end) sub List List temp = new ArrayList(); for (int i = start; i < end; i++) { temp.add(list.get(i)); return temp; |
List> | subList(List> list, int fromIndex, int toIndex) sub List return list.subList(fromIndex, toIndex);
|
List> | subList(List> list, int page, int size) sub List return list.subList(Math.min(list.size(), (page - 1) * size), Math.min(list.size(), size * page));
|
List | subList(List Returns a sub-list from a given position to the end. return list.subList(fromIndex, list.size());
|
List | subList(List Returns a subList. if (top == 0 || skip >= list.size()) { return Collections.emptyList(); int lastIndex = skip + top; if (lastIndex > list.size()) { lastIndex = list.size(); return list.subList(skip, lastIndex); ... |
List | subList(List sub List List<E> newList = new ArrayList<E>(); int normalizedSize = list.size() - 1; if ((start < 0) || (start > normalizedSize) || (end < 0) || (start > end)) { return newList; for (int i = start; (i < end) && (i <= normalizedSize); i++) { newList.add(list.get(i)); return newList; |