{@inheritDoc}
This implementation returns a list that subclasses {@code AbstractList}. The subclass stores, in private fields, the offset of the subList within the backing list, the size of the subList (which can change over its lifetime), and the expected {@code modCount} value of the backing list. There are two variantsof the subclass, one of which implements {@code RandomAccess}. If this list implements {@code RandomAccess} the returned list willbe an instance of the subclass that implements {@code RandomAccess}.
The subclass's {@code set(int, E)}, {@code get(int)}, {@code add(int, E)}, {@code remove(int)}, {@code addAll(int,Collection)} and {@code removeRange(int, int)} methods alldelegate to the corresponding methods on the backing abstract list, after bounds-checking the index and adjusting for the offset. The {@code addAll(Collection c)} method merely returns {@code addAll(size,c)}.
The {@code listIterator(int)} method returns a "wrapper object"over a list iterator on the backing list, which is created with the corresponding method on the backing list. The {@code iterator} methodmerely returns {@code listIterator()}, and the {@code size} methodmerely returns the subclass's {@code size} field.
All methods first check to see if the actual {@code modCount} ofthe backing list is equal to its expected value, and throw a {@code ConcurrentModificationException} if it is not.
@throws IndexOutOfBoundsException endpoint index value out of range{@code (fromIndex < 0 || toIndex> size)}
@throws IllegalArgumentException if the endpoint indices are out of order{@code (fromIndex > toIndex)}