public class ListUtils
extends java.lang.Object
Constructor and Description |
---|
ListUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.List<T> |
copySubList(java.util.List<T> list,
int fromIndex,
int toIndex)
Unlike List.subList(), which returns a live view of a set of List
elements, this method returns a new copy of the list.
|
public static <T> java.util.List<T> copySubList(java.util.List<T> list, int fromIndex, int toIndex)
list
- The source ListfromIndex
- Starting index in the source ListtoIndex
- Ending index in the source Listjava.lang.IndexOutOfBoundsException
- Call exceeds the bounds of the source Listjava.lang.IllegalArgumentException
- fromIndex and toIndex are not in sequenceCopyright © 2005-2024 Restlet.