public class ReversedList<E>
extends AbstractList
implements RandomAccess, Serializable
Represents view of reversed list
| Constructor and description |
|---|
ReversedList(List<E> list)Creates a reversed view of the supplied list. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public E |
get(int index)Returns the element at the specified position in this list.
|
|
public int |
size() |
| Methods inherited from class | Name |
|---|---|
class AbstractList |
add, add, addAll, addAll, clear, contains, containsAll, equals, forEach, get, getClass, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, notify, notifyAll, parallelStream, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, stream, subList, toArray, toArray, toArray, toString, wait, wait, wait |
Creates a reversed view of the supplied list.
list - the list to expose in reverse orderReturns the element at the specified position in this list.
index < 0 || index >= size())index < 0 || index >= size())index - index of the element to returnindex - index of the element to return
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.