protected class IdentityArrayList.IdentitySubList extends DelegateList<E> implements RandomAccess
DelegateList
providing the same behavior of
IdentityArrayList
to the class returned by
ArrayList.subList(int,int)
.target
modCount
Constructor and Description |
---|
IdentitySubList(List<E> target)
Creates a new
IdentityArrayList.IdentitySubList with the specified subList target. |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Object o) |
int |
indexOf(Object o) |
int |
lastIndexOf(Object o) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
IdentityArrayList.IdentitySubList |
subList(int fromIndex,
int toIndex) |
add, add, addAll, addAll, clear, containsAll, equals, forEach, get, hashCode, isEmpty, iterator, listIterator, listIterator, parallelStream, remove, removeIf, replaceAll, set, size, sort, spliterator, stream, superForEach, superParallelStream, superRemoveIf, superReplaceAll, superSort, superSpliterator, superStream, toArray, toArray, toString
removeRange
public IdentitySubList(List<E> target)
IdentityArrayList.IdentitySubList
with the specified subList target.target
- The subList to which the method calls of this instance will
be delegated.public boolean contains(Object o)
contains
in interface Collection<E>
contains
in interface List<E>
contains
in class DelegateList<E>
public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E>
lastIndexOf
in class DelegateList<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in interface List<E>
remove
in class DelegateList<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface List<E>
removeAll
in class DelegateList<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in interface List<E>
retainAll
in class DelegateList<E>
public IdentityArrayList.IdentitySubList subList(int fromIndex, int toIndex)
DelegateList
The class DelegateList
does not itself implement
#subList(int,int)
, so calling this method on an instance of a
subclass of DelegateList
that does not override this method will
result in a UnsupportedOperationException
.
Copyright © 2020 LibJ. All rights reserved.