List of utility methods to do List Sub List
List | subList(List sub List List<T> subList = new ArrayList<>(); for (int i = start; i < end; i++) { if (list.size() > i) { subList.add(list.get(i)); } else { break; return subList; |
List | sublist(List Sub list int fromIndex = Math.min(start, list.size()); int toIndex = Math.min(fromIndex + limit, list.size()); return list.subList(fromIndex, toIndex); |
List | subList(List Returns the sub list of the given list avoiding exceptions, starting on the given start index and returning at maximum the given max number of items. if (list == null) { return null; int end = start + max; return list.subList(Math.max(0, start), Math.min(list.size(), end)); |
List | subList(List sub List if (list == null || list.size() == 0) { return list; if (indexs == null || indexs.length == 0) { return new ArrayList<T>(0); List<T> result = new ArrayList<T>(indexs.length); for (int index : indexs) { ... |
List | subList(List sub List return origin.subList(start, start + length);
|
List | subList(List sub List List<T> l = new ArrayList<T>(); for (int i = start; i < end; i++) { l.add(parentList.get(i)); return l; |
ArrayList | subList(List sub List int to; Iterator<T> e; ArrayList<T> list; if (query == null || query.isEmpty() || first >= query.size()) return null; to = Math.min(first + max, query.size()); list = new ArrayList<T>(to - first); e = query.listIterator(first); ... |
List | subList(List sub List int count = src.size(); int batchCount = (count + preBatchCount - 1) / preBatchCount; List[] result = new List[batchCount]; for (int index = 0; index < batchCount; ++index) { int begin = index * preBatchCount; int end = (index + 1) * preBatchCount; if (end > count) { end = count; ... |
List | subList(List Returns a section of the given list. List<X> temp = new ArrayList<X>(); for (int i = start; i < end; i++) { temp.add(list.get(i)); return temp; |
List | subListByStartAndEnd(List sub List By Start And End List<M> returnList = new ArrayList<M>(); for (M element : list) { if (element.compareTo(start) >= 0 && element.compareTo(end) <= 0) { returnList.add(element); return returnList; |