E - the element type.public final class ReverseListView<E> extends Object implements List<E>
List.
In contrast to Collections.reverse(List), wrapping a ReverseListView around another
List does not modify the wrapped List. It is fully backed by the original List,
hence every write operation is written through and modifications to the underlying List are
immediately visible.
| Constructor and Description |
|---|
ReverseListView(List<E> list) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
E |
get(int index) |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, streampublic ReverseListView(List<E> list)
public int size()
public boolean isEmpty()
public <T> T[] toArray(T[] a)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>public boolean addAll(Collection<? extends E> c)
public boolean addAll(int index, Collection<? extends E> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public int hashCode()
public int lastIndexOf(Object o)
lastIndexOf in interface List<E>public final ListIterator<E> listIterator()
listIterator in interface List<E>public final ListIterator<E> listIterator(int index)
listIterator in interface List<E>Copyright © 2013–2019. All rights reserved.