Class ArrayListSml<E>

Type Parameters:
E -
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class ArrayListSml<E> extends ArrayList<E>
Collection which sets parent correctly
Since:
3.3.3
Author:
jharrop
See Also:
  • Constructor Details

    • ArrayListSml

      public ArrayListSml(Object o)
  • Method Details

    • contains

      public boolean contains(Object o)
      Returns true if this list contains the specified element (or a JAXBElement containing it).
      Specified by:
      contains in interface Collection<E>
      Specified by:
      contains in interface List<E>
      Overrides:
      contains in class 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(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 List<E>
      Overrides:
      indexOf in class ArrayList<E>
      Since:
      8.1.4
    • lastIndexOf

      public int lastIndexOf(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 List<E>
      Overrides:
      lastIndexOf in class 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 List<E>
      Overrides:
      set in class 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:
      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 Collection<E>
      Specified by:
      add in interface List<E>
      Overrides:
      add in class 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 List<E>
      Overrides:
      add in class ArrayList<E>
      Parameters:
      index - index at which the specified element is to be inserted
      element - element to be inserted
      Throws:
      IndexOutOfBoundsException
      Since:
      8.1.4
    • remove

      public boolean remove(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 Collection<E>
      Specified by:
      remove in interface List<E>
      Overrides:
      remove in class 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(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 Collection<E>
      Specified by:
      addAll in interface List<E>
      Overrides:
      addAll in class 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:
      NullPointerException - if the specified collection is null
      Since:
      8.1.4
    • addAll

      public boolean addAll(int index, 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 List<E>
      Overrides:
      addAll in class 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:
      IndexOutOfBoundsException
      NullPointerException - if the specified collection is null
      Since:
      8.1.4
    • removeAll

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

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

      public Object getParent()
      Returns:
      Since:
      8.1.4