org.apache.commons.jexl3.internal.introspection

## Class ArrayListWrapper

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList<Object>
    - - org.apache.commons.jexl3.internal.introspection.ArrayListWrapper

- All Implemented Interfaces:
    Iterable<Object>, Collection<Object>, List<Object>, RandomAccess

      public class ArrayListWrapper
      extends AbstractList<Object>
      implements RandomAccess

  A class that wraps an array within an AbstractList.

  It overrides some methods because introspection uses this class a a marker for wrapped arrays; the declared class for these method is thus ArrayListWrapper. The methods are get/set/size/contains and indexOf because it is used by contains.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArrayListWrapper(Object anArray)` Create the wrapper.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `contains(Object o)`
    `Object` | `get(int index)`
    `int` | `indexOf(Object o)`
    `Object` | `set(int index, Object element)`
    `int` | `size()`

    - ### Methods inherited from class java.util.AbstractList

      `add, add, addAll, clear, equals, hashCode, iterator, lastIndexOf, listIterator, listIterator, remove, subList`

    - ### Methods inherited from class java.util.AbstractCollection

      `addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.List

      `addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, removeIf, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Constructor Detail

    - #### ArrayListWrapper

          public ArrayListWrapper(Object anArray)

      Create the wrapper.
      Parameters:
        `anArray` - `array`

  - ### Method Detail

    - #### get

          public Object get(int index)

      Specified by:
        `get` in interface `List<Object>`
      Specified by:
        `get` in class `AbstractList<Object>`

    - #### set

          public Object set(int index,
                            Object element)

      Specified by:
        `set` in interface `List<Object>`
      Overrides:
        `set` in class `AbstractList<Object>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `Collection<Object>`
      Specified by:
        `size` in interface `List<Object>`
      Specified by:
        `size` in class `AbstractCollection<Object>`

    - #### indexOf

          public int indexOf(Object o)

      Specified by:
        `indexOf` in interface `List<Object>`
      Overrides:
        `indexOf` in class `AbstractList<Object>`

    - #### contains

          public boolean contains(Object o)

      Specified by:
        `contains` in interface `Collection<Object>`
      Specified by:
        `contains` in interface `List<Object>`
      Overrides:
        `contains` in class `AbstractCollection<Object>`

Copyright © 2001–2021 The Apache Software Foundation. All rights reserved.