public class ReversedList<T> extends AbstractList<T> implements RandomAccess
ReversedList is a view on an other list with the elements in reverse order.
This implementation is made for RandomAccess lists.modCount| Constructor and Description |
|---|
ReversedList(List<T> original) |
| Modifier and Type | Method and Description |
|---|---|
T |
get(int index) |
static <T> List<T> |
reversed(List<T> list)
Creates a list that is a view on
list in reverse order. |
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringaddAll, contains, containsAll, copyOf, isEmpty, of, of, of, of, of, of, of, of, of, of, of, of, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, stream, toArraypublic T get(int index)
public int size()
size in interface Collection<T>size in interface List<T>size in class AbstractCollection<T>