Package: org.apache.groovy.util

## [Java] Class ReversedList<E>

- org.apache.groovy.util.ReversedList

- All Implemented Interfaces and Traits:
    RandomAccess, Serializable

      public class ReversedList<E>
      extends AbstractList
      implements RandomAccess, Serializable

  Represents view of reversed list

  Since:
    4.0.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `ReversedList(List<E> list)` Creates a reversed view of the supplied list.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public E` | `get(int index)` Returns the element at the specified position in this list. throws: IndexOutOfBoundsException if the index is out of range (`index < 0 || index >= size()`) throws: IndexOutOfBoundsException Returns the element at the specified position in this list. throws: IndexOutOfBoundsException if the index is out of range (`index < 0 || index >= size()`) Parameters: `index` - index of the element to return `index` - index of the element to return Returns: the element at the specified position in this list the element at the specified position in this list
    `` | `public int` | `size()`

  - ### Inherited Methods Summary

    Inherited Methods
    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`

- - ### Constructor Detail

    - #### public ReversedList(List<E> list)

      Creates a reversed view of the supplied list.

      Parameters:
        `list` - the list to expose in reverse order

  - ### Method Detail

    - #### public E get(int index)

      Returns the element at the specified position in this list.

      throws:
        IndexOutOfBoundsException if the index is out of range (`index < 0 || index >= size()`)
      throws:
        IndexOutOfBoundsException Returns the element at the specified position in this list.
      throws:
        IndexOutOfBoundsException if the index is out of range (`index < 0 || index >= size()`)
      Parameters:
        `index` - index of the element to return
        `index` - index of the element to return
      Returns:
        the element at the specified position in this list
        the element at the specified position in this list

    - #### public int size()