Class ArrayListSml<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.xlsx4j.sml.ArrayListSml<E>
Type Parameters:
E -
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess

public class ArrayListSml<E>
extends java.util.ArrayList<E>
Collection which sets parent correctly
Since:
3.3.3
Author:
jharrop
See Also:
Serialized Form
  • Field Summary

    Fields inherited from class java.util.AbstractList

    modCount
  • Constructor Summary

    Constructors 
    Constructor Description
    ArrayListSml​(java.lang.Object o)  
  • Method Summary

    Modifier and Type Method Description
    void add​(int index, E e)
    Inserts the specified element at the specified position in this list, checking for common content errors, and setting parent correctly.
    boolean add​(E e)
    Appends the specified element to the end of this list, checking for common content errors, and setting parent correctly.
    boolean addAll​(int index, java.util.Collection<? extends E> c)
    Inserts all of the elements in the specified collection into this list (checking for common content errors etc), starting at the specified position.
    boolean addAll​(java.util.Collection<? extends E> c)
    Appends all of the elements in the specified collection to the end of this list, checking for common content errors, and setting parent correctly.
    boolean contains​(java.lang.Object o)
    Returns true if this list contains the specified element (or a JAXBElement containing it).
    java.lang.Object getParent()  
    int indexOf​(java.lang.Object o)
    Returns the index of the first occurrence of the specified element (or a JAXBElement containing it) in this list, or -1 if this list does not contain the element.
    int lastIndexOf​(java.lang.Object o)
    Returns the index of the last occurrence of the specified element (or a JAXBElement containing it) in this list, or -1 if this list does not contain the element.
    boolean remove​(java.lang.Object o)
    Removes the first occurrence of the specified element (or a JAXBElement containing it) from this list, if it is present.
    boolean removeAll​(java.util.Collection<?> c)  
    boolean retainAll​(java.util.Collection<?> c)  
    E set​(int index, E e)
    Replaces the element at the specified position in this list with the specified element, checking for common content errors, and setting parent correctly.

    Methods inherited from class java.util.ArrayList

    clear, clone, ensureCapacity, equals, forEach, get, hashCode, isEmpty, iterator, listIterator, listIterator, remove, removeIf, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSize

    Methods inherited from class java.util.AbstractCollection

    containsAll, toString

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Collection

    parallelStream, stream, toArray

    Methods inherited from interface java.util.List

    containsAll
  • Constructor Details

  • Method Details

    • contains

      public boolean contains​(java.lang.Object o)
      Returns true if this list contains the specified element (or a JAXBElement containing it).
      Specified by:
      contains in interface java.util.Collection<E>
      Specified by:
      contains in interface java.util.List<E>
      Overrides:
      contains in class java.util.ArrayList<E>
      Parameters:
      o - element whose presence in this list is to be tested
      Returns:
      true if this list contains the specified element
      Since:
      8.1.4
    • indexOf

      public int indexOf​(java.lang.Object o)
      Returns the index of the first occurrence of the specified element (or a JAXBElement containing it) in this list, or -1 if this list does not contain the element.
      Specified by:
      indexOf in interface java.util.List<E>
      Overrides:
      indexOf in class java.util.ArrayList<E>
      Since:
      8.1.4
    • lastIndexOf

      public int lastIndexOf​(java.lang.Object o)
      Returns the index of the last occurrence of the specified element (or a JAXBElement containing it) in this list, or -1 if this list does not contain the element.
      Specified by:
      lastIndexOf in interface java.util.List<E>
      Overrides:
      lastIndexOf in class java.util.ArrayList<E>
      Since:
      8.1.4
    • set

      public E set​(int index, E e)
      Replaces the element at the specified position in this list with the specified element, checking for common content errors, and setting parent correctly.
      Specified by:
      set in interface java.util.List<E>
      Overrides:
      set in class java.util.ArrayList<E>
      Parameters:
      index - index of the element to replace
      element - element to be stored at the specified position
      Returns:
      the element previously at the specified position
      Throws:
      java.lang.IndexOutOfBoundsException
      Since:
      8.1.4
    • add

      public boolean add​(E e)
      Appends the specified element to the end of this list, checking for common content errors, and setting parent correctly.
      Specified by:
      add in interface java.util.Collection<E>
      Specified by:
      add in interface java.util.List<E>
      Overrides:
      add in class java.util.ArrayList<E>
      Parameters:
      e - element to be appended to this list
      Returns:
      true (as specified by Collection.add(E))
    • add

      public void add​(int index, E e)
      Inserts the specified element at the specified position in this list, checking for common content errors, and setting parent correctly.
      Specified by:
      add in interface java.util.List<E>
      Overrides:
      add in class java.util.ArrayList<E>
      Parameters:
      index - index at which the specified element is to be inserted
      element - element to be inserted
      Throws:
      java.lang.IndexOutOfBoundsException
      Since:
      8.1.4
    • remove

      public boolean remove​(java.lang.Object o)
      Removes the first occurrence of the specified element (or a JAXBElement containing it) from this list, if it is present. If the list does not contain the element, it is unchanged.
      Specified by:
      remove in interface java.util.Collection<E>
      Specified by:
      remove in interface java.util.List<E>
      Overrides:
      remove in class java.util.ArrayList<E>
      Parameters:
      o - element to be removed from this list, if present
      Returns:
      true if this list contained the specified element
      Since:
      8.1.4
    • addAll

      public boolean addAll​(java.util.Collection<? extends E> c)
      Appends all of the elements in the specified collection to the end of this list, checking for common content errors, and setting parent correctly.
      Specified by:
      addAll in interface java.util.Collection<E>
      Specified by:
      addAll in interface java.util.List<E>
      Overrides:
      addAll in class java.util.ArrayList<E>
      Parameters:
      c - collection containing elements to be added to this list
      Returns:
      true if this list changed as a result of the call
      Throws:
      java.lang.NullPointerException - if the specified collection is null
      Since:
      8.1.4
    • addAll

      public boolean addAll​(int index, java.util.Collection<? extends E> c)
      Inserts all of the elements in the specified collection into this list (checking for common content errors etc), starting at the specified position.
      Specified by:
      addAll in interface java.util.List<E>
      Overrides:
      addAll in class java.util.ArrayList<E>
      Parameters:
      index - index at which to insert the first element from the specified collection
      c - collection containing elements to be added to this list
      Returns:
      true if this list changed as a result of the call
      Throws:
      java.lang.IndexOutOfBoundsException
      java.lang.NullPointerException - if the specified collection is null
      Since:
      8.1.4
    • removeAll

      public boolean removeAll​(java.util.Collection<?> c)
      Specified by:
      removeAll in interface java.util.Collection<E>
      Specified by:
      removeAll in interface java.util.List<E>
      Overrides:
      removeAll in class java.util.ArrayList<E>
    • retainAll

      public boolean retainAll​(java.util.Collection<?> c)
      Specified by:
      retainAll in interface java.util.Collection<E>
      Specified by:
      retainAll in interface java.util.List<E>
      Overrides:
      retainAll in class java.util.ArrayList<E>
    • getParent

      public java.lang.Object getParent()
      Returns:
      Since:
      8.1.4