Package ghidra.util.datastruct

# Class DefaultObservableCollection<E,L extends CollectionChangeListener<? super E>>

java.lang.Object
org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
ghidra.util.datastruct.DefaultObservableCollection<E,L>

All Implemented Interfaces:
  `ObservableCollection<E,L>`, `Serializable`, `Iterable<E>`, `Collection<E>`

public class DefaultObservableCollection<E,L extends CollectionChangeListener<? super E>> extends org.apache.commons.collections4.collection.AbstractCollectionDecorator<E> implements ObservableCollection<E,L>

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `protected static enum`
  `DefaultObservableCollection.Change`
  `protected class`
  `DefaultObservableCollection.ChangeSet`
  `protected class`
  `DefaultObservableCollection.DefaultChangeAggregator`

  ## Nested classes/interfaces inherited from interface ghidra.util.datastruct.ObservableCollection

  `ObservableCollection.ChangeAggregator`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected int`
  `aggregatorCount`
  `protected final DefaultObservableCollection<E,L>.ChangeSet`
  `changes`
  `protected CollectionChangeListener<? super E>`
  `l`
  `protected final ListenerSet<L>`
  `listeners`
  `protected final Object`
  `lock`
  `protected final Collection<E>`
  `wrapped`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `DefaultObservableCollection(Collection<E> wrapped, Class<L> listenerClass)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `add(E e)`
  `boolean`
  `addAll(Collection<? extends E> c)`
  `void`
  `addChangeListener(L listener)`
  `ObservableCollection.ChangeAggregator`
  `aggregateChanges()`
  `void`
  `clear()`
  `protected Collection<E>`
  `decorated()`
  `Iterator<E>`
  `iterator()`
  `protected void`
  `notifyAdded(E e)`
  `void`
  `notifyModified(E e)`
  `protected void`
  `notifyRemoved(E e)`
  `boolean`
  `remove(Object o)`
  `boolean`
  `removeAll(Collection<?> c)`
  `void`
  `removeChangeListener(L listener)`
  `boolean`
  `retainAll(Collection<?> c)`

  ### Methods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecorator

  `contains, containsAll, isEmpty, setCollection, size, toArray, toArray, toString`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

  `contains, containsAll, equals, hashCode, isEmpty, parallelStream, removeIf, size, spliterator, stream, toArray, toArray, toArray`

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

  `forEach`

- ## Field Details

  - ### lock

    protected final Object lock

  - ### listeners

    protected final ListenerSet<L extends CollectionChangeListener<? super E>> listeners

  - ### wrapped

    protected final Collection<E> wrapped

  - ### aggregatorCount

    protected int aggregatorCount

  - ### changes

    protected final DefaultObservableCollection<E,L extends CollectionChangeListener<? super E>>.ChangeSet changes

  - ### l

    protected CollectionChangeListener<? super E> l

- ## Constructor Details

  - ### DefaultObservableCollection

    protected DefaultObservableCollection(Collection<E> wrapped, Class<L> listenerClass)

- ## Method Details

  - ### decorated

    protected Collection<E> decorated()
    Overrides:
      `decorated` in class `org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>`

  - ### addChangeListener

    public void addChangeListener(L listener)
    Specified by:
      `addChangeListener` in interface `ObservableCollection<E,L extends CollectionChangeListener<? super E>>`

  - ### removeChangeListener

    public void removeChangeListener(L listener)
    Specified by:
      `removeChangeListener` in interface `ObservableCollection<E,L extends CollectionChangeListener<? super E>>`

  - ### iterator

    public Iterator<E> iterator()
    Specified by:
      `iterator` in interface `Collection<E>`
    Specified by:
      `iterator` in interface `Iterable<E>`
    Overrides:
      `iterator` in class `org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>`

  - ### add

    public boolean add(E e)
    Specified by:
      `add` in interface `Collection<E>`
    Overrides:
      `add` in class `org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>`

  - ### remove

    public boolean remove(Object o)
    Specified by:
      `remove` in interface `Collection<E>`
    Overrides:
      `remove` in class `org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>`

  - ### addAll

    public boolean addAll(Collection<? extends E> c)
    Specified by:
      `addAll` in interface `Collection<E>`
    Overrides:
      `addAll` in class `org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>`

  - ### removeAll

    public boolean removeAll(Collection<?> c)
    Specified by:
      `removeAll` in interface `Collection<E>`
    Overrides:
      `removeAll` in class `org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>`

  - ### retainAll

    public boolean retainAll(Collection<?> c)
    Specified by:
      `retainAll` in interface `Collection<E>`
    Overrides:
      `retainAll` in class `org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>`

  - ### clear

    public void clear()
    Specified by:
      `clear` in interface `Collection<E>`
    Overrides:
      `clear` in class `org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>`

  - ### notifyAdded

    protected void notifyAdded(E e)

  - ### notifyModified

    public void notifyModified(E e)
    Specified by:
      `notifyModified` in interface `ObservableCollection<E,L extends CollectionChangeListener<? super E>>`

  - ### notifyRemoved

    protected void notifyRemoved(E e)

  - ### aggregateChanges

    public ObservableCollection.ChangeAggregator aggregateChanges()
    Specified by:
      `aggregateChanges` in interface `ObservableCollection<E,L extends CollectionChangeListener<? super E>>`