class ImmutableList.SubList extends ImmutableList<E>
ImmutableList.Builder<E>, ImmutableList.SerializedForm, ImmutableList.SubList| Modifier and Type | Field and Description |
|---|---|
(package private) int |
length |
(package private) int |
offset |
SPLITERATOR_CHARACTERISTICS| Constructor and Description |
|---|
SubList(int offset,
int length) |
| Modifier and Type | Method and Description |
|---|---|
E |
get(int index) |
(package private) boolean |
isPartialView()
Returns
true if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods. |
int |
size() |
ImmutableList<E> |
subList(int fromIndex,
int toIndex)
Returns an immutable list of the elements between the specified
fromIndex, inclusive,
and toIndex, exclusive. |
add, addAll, asImmutableList, asImmutableList, asList, builder, builderWithExpectedSize, contains, copyIntoArray, copyOf, copyOf, copyOf, copyOf, equals, forEach, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, of, remove, replaceAll, reverse, set, sort, sortedCopyOf, sortedCopyOf, spliterator, subListUnchecked, toImmutableList, writeReplaceadd, addAll, clear, internalArray, internalArrayEnd, internalArrayStart, remove, removeAll, removeIf, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic int size()
public E get(int index)
public ImmutableList<E> subList(int fromIndex, int toIndex)
ImmutableListfromIndex, inclusive,
and toIndex, exclusive. (If fromIndex and toIndex are equal, the empty
immutable list is returned.)subList in interface java.util.List<E>subList in class ImmutableList<E>boolean isPartialView()
ImmutableCollectiontrue if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods. This is generally
used to determine whether copyOf implementations should make an explicit copy to avoid
memory leaks.isPartialView in class ImmutableCollection<E>