Class CheckedArrayList<E>

    • Constructor Summary

      Constructors 
      Constructor Description
      CheckedArrayList​(Class<E> type)
      Constructs a list of the specified type.
      CheckedArrayList​(Class<E> type, int capacity)
      Constructs a list of the specified type and initial capacity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, E element)
      Inserts the specified element at the specified position in this list.
      boolean add​(E element)
      Appends the specified element to the end of this list.
      boolean addAll​(int index, Collection<? extends E> collection)
      Inserts all of the elements in the specified collection into this list, starting at the specified position.
      boolean addAll​(Collection<? extends E> collection)
      Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified Collection's Iterator.
      protected void checkWritePermission()
      Checks if changes in this collection are allowed.
      void clear()
      Removes all of the elements from this list.
      CheckedArrayList<E> clone()
      Returns a shallow copy of this list.
      boolean contains​(Object o)
      Returns true if this list contains the specified element.
      void ensureCapacity​(int minCapacity)
      Increases the capacity, if necessary, to ensure that it can hold the given number of elements.
      protected void ensureValidType​(E element)
      Checks the type of the specified object.
      boolean equals​(Object o)
      Compares the specified object with this list for equality.
      E get​(int index)
      Returns the element at the specified position in this list.
      Class<E> getElementType()
      Returns the element type given at construction time.
      protected Object getLock()
      Returns the synchronization lock.
      int hashCode()
      Returns the hash code value for this list.
      int indexOf​(Object o)
      Returns the index of the first occurrence of the specified element in this list, or -1 if none.
      boolean isEmpty()
      Returns true if this list contains no elements.
      Iterator<E> iterator()
      Returns an iterator over the elements in this list.
      int lastIndexOf​(Object o)
      Returns the index of the last occurrence of the specified element in this list, or -1 if none.
      E remove​(int index)
      Removes the element at the specified position in this list.
      boolean remove​(Object o)
      Removes the first occurrence of the specified element from this list.
      boolean removeAll​(Collection<?> c)
      Removes all of this list's elements that are also contained in the specified collection.
      boolean retainAll​(Collection<?> c)
      Retains only the elements in this list that are contained in the specified collection.
      E set​(int index, E element)
      Replaces the element at the specified position in this list with the specified element.
      int size()
      Returns the number of elements in this list.
      Object[] toArray()
      Returns an array containing all of the elements in this list.
      <T> T[] toArray​(T[] a)
      Returns an array containing all of the elements in this list in proper sequence.
      String toString()
      Returns a string representation of this list.
      void trimToSize()
      Trims the capacity to the list's current size.