Package org.eclipse.net4j.util.container

## Class Container<E>

- java.lang.Object
- - org.eclipse.net4j.util.event.Notifier
  - - org.eclipse.net4j.util.lifecycle.Lifecycle
    - - org.eclipse.net4j.util.lifecycle.ShareableLifecycle
      - - org.eclipse.net4j.util.container.Container<E>

- All Implemented Interfaces:
    `IContainer<E>`, `INotifier`, `INotifier.INotifier2`, `IDeactivateable`, `ILifecycle`, `ILifecycle.DeferrableActivation`
  Direct Known Subclasses:
    `Registry`, `SetContainer`

      public abstract class Container<E>
      extends ShareableLifecycle
      implements IContainer<E>

  An abstract base implementation of a `container` with a `lifecycle`.
  Author:
    Eike Stepper

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer

      `IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle

      `ILifecycle.DeferrableActivation`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier

      `INotifier.INotifier2`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `USE_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Container()` |
    `Container​(boolean shareable)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `fireContainerEvent​(E[] elements, IContainerDelta.Kind kind)` |
    `void` | `fireContainerEvent​(E element, IContainerDelta.Kind kind)` |
    `void` | `fireContainerEvent​(java.util.List<IContainerDelta<E>> deltas)` |
    `void` | `fireElementAddedEvent​(E element)` |
    `void` | `fireElementRemovedEvent​(E element)` |
    `void` | `fireElementsAddedEvent​(E[] elements)` |
    `void` | `fireElementsRemovedEvent​(E[] elements)` |
    `void` | `fireEvent​(IEvent event)` |
    `boolean` | `isEmpty()` |
    `protected ContainerEvent<E>` | `newContainerEvent()` |
    `protected SingleDeltaContainerEvent<E>` | `newContainerEvent​(E element, IContainerDelta.Kind kind)` |

    - ### Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle

      `activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString`

    - ### Methods inherited from class org.eclipse.net4j.util.event.Notifier

      `addListener, addUniqueListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener`

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

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

    - ### Methods inherited from interface org.eclipse.net4j.util.container.IContainer

      `getElements`

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Constructor Detail

    - #### Container

          public Container()

    - #### Container

          public Container​(boolean shareable)

      Since:
        3.3

  - ### Method Detail

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `IContainer<E>`

    - #### fireEvent

          public void fireEvent​(IEvent event)

      Overrides:
        `fireEvent` in class `Notifier`

    - #### fireContainerEvent

          public void fireContainerEvent​(E element,
                                         IContainerDelta.Kind kind)

    - #### fireElementAddedEvent

          public void fireElementAddedEvent​(E element)

    - #### fireElementRemovedEvent

          public void fireElementRemovedEvent​(E element)

    - #### fireContainerEvent

          public void fireContainerEvent​(E[] elements,
                                         IContainerDelta.Kind kind)

      Since:
        2.0

    - #### fireElementsAddedEvent

          public void fireElementsAddedEvent​(E[] elements)

      Since:
        2.0

    - #### fireElementsRemovedEvent

          public void fireElementsRemovedEvent​(E[] elements)

      Since:
        2.0

    - #### fireContainerEvent

          public void fireContainerEvent​(java.util.List<IContainerDelta<E>> deltas)

    - #### newContainerEvent

          protected SingleDeltaContainerEvent<E> newContainerEvent​(E element,
                                                                   IContainerDelta.Kind kind)

    - #### newContainerEvent

          protected ContainerEvent<E> newContainerEvent()