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:
  `ContainerElementList`, `ModifiableContainer`, `Registry`

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 class org.eclipse.net4j.util.event.Notifier

`Notifier.Cancelation`

## 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

Modifier and Type
Method
Description
`void`
`fireContainerEvent(E[] elements, IContainerDelta.Kind kind)`
`void`
`fireContainerEvent(E element, IContainerDelta.Kind kind)`
`void`
`fireContainerEvent(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 Details

### Container

public Container()

### Container

public Container(boolean shareable)

Since:
  3.3

## Method Details

### 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(List<IContainerDelta<E>> deltas)

### newContainerEvent

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

### newContainerEvent

protected ContainerEvent<E> newContainerEvent()