Package org.jsoup.helper

Class ChangeNotifyingArrayList<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.jsoup.helper.ChangeNotifyingArrayList<E>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public abstract class ChangeNotifyingArrayList<E> extends ArrayList<E>
Implementation of ArrayList that watches out for changes to the contents.
See Also:
  • Field Summary

    Fields inherited from class java.util.AbstractList

    modCount
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChangeNotifyingArrayList(int initialCapacity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int index, E element)
     
    boolean
    add(E e)
     
    boolean
    addAll(int index, Collection<? extends E> c)
     
    boolean
    addAll(Collection<? extends E> c)
     
    void
    clear()
     
    abstract void
     
    E
    remove(int index)
     
    boolean
    remove(Object o)
     
    boolean
    removeAll(Collection<?> c)
     
    protected void
    removeRange(int fromIndex, int toIndex)
     
    boolean
    retainAll(Collection<?> c)
     
    E
    set(int index, E element)
     

    Methods inherited from class java.util.ArrayList

    clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeIf, 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

    • ChangeNotifyingArrayList

      public ChangeNotifyingArrayList(int initialCapacity)
  • Method Details

    • onContentsChanged

      public abstract void onContentsChanged()
    • set

      public E set(int index, E element)
      Specified by:
      set in interface List<E>
      Overrides:
      set in class ArrayList<E>
    • add

      public boolean add(E e)
      Specified by:
      add in interface Collection<E>
      Specified by:
      add in interface List<E>
      Overrides:
      add in class ArrayList<E>
    • add

      public void add(int index, E element)
      Specified by:
      add in interface List<E>
      Overrides:
      add in class ArrayList<E>
    • remove

      public E remove(int index)
      Specified by:
      remove in interface List<E>
      Overrides:
      remove in class ArrayList<E>
    • remove

      public boolean remove(Object o)
      Specified by:
      remove in interface Collection<E>
      Specified by:
      remove in interface List<E>
      Overrides:
      remove in class ArrayList<E>
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<E>
      Specified by:
      clear in interface List<E>
      Overrides:
      clear in class ArrayList<E>
    • addAll

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

      public boolean addAll(int index, Collection<? extends E> c)
      Specified by:
      addAll in interface List<E>
      Overrides:
      addAll in class ArrayList<E>
    • removeRange

      protected void removeRange(int fromIndex, int toIndex)
      Overrides:
      removeRange in class ArrayList<E>
    • 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>