Returns a view of the elements within me between the specified
fromIndex, inclusive, and
toIndex, exclusive. The returned
LongList
is backed by me, so that any changes in the returned list are reflected in me, and vice-versa. The returned list supports all of the optional operations that I support.
Note that when
fromIndex == toIndex
, the returned list is initially empty, and when
fromIndex == 0 && toIndex == {@link #size() size()}
the returned list is my "improper" sublist, containing all my elements.
The semantics of the returned list become undefined if I am structurally modified in any way other than via the returned list.
@param fromIndex the smallest index (inclusive) in me that appears in the returned list
@param toIndex the largest index (exclusive) in me that appears in the returned list
@return a view of this list from
fromIndex (inclusive) to
toIndex (exclusive)
@throws IndexOutOfBoundsException if either specified index is out of range