Package org.eclipse.net4j.util.container

# Class ContainerElementList<ELEMENT>

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<ELEMENT>
org.eclipse.net4j.util.container.ContainerElementList<ELEMENT>

All Implemented Interfaces:
  `IContainer<ELEMENT>`, `INotifier`, `INotifier.INotifier2`, `IDeactivateable`, `ILifecycle`, `ILifecycle.DeferrableActivation`

public class ContainerElementList<ELEMENT> extends Container<ELEMENT>

Since:
  3.26
Author:
  Eike Stepper

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static interface`
`ContainerElementList.Prioritized`
Smaller `priority` values are ranked higher.

## 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
`ContainerElementList(Class<ELEMENT> elementType)`
`ContainerElementList(Class<ELEMENT> elementType, IManagedContainer container)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doActivate()`
`protected void`
`doDeactivate()`
`final boolean`
`forEachElement(Predicate<ELEMENT> handler)`
`final IManagedContainer`
`getContainer()`
`final ELEMENT[]`
`getElements()`
`final Class<ELEMENT>`
`getElementType()`
`protected Object[]`
`getInitialElements(IManagedContainer container)`
`protected final void`
`initContainerElements(String productGroup)`
`protected final void`
`initContainerElements(String productGroup, String type)`
`protected final void`
`initContainerElements(String productGroup, String type, String description)`
`final boolean`
`isEmpty()`
`protected ELEMENT[]`
`postProcessElementArray(ELEMENT[] elements)`
`protected boolean`
`testElement(Object object)`

### Methods inherited from class org.eclipse.net4j.util.container.Container

`fireContainerEvent, fireContainerEvent, fireContainerEvent, fireElementAddedEvent, fireElementRemovedEvent, fireElementsAddedEvent, fireElementsRemovedEvent, fireEvent, newContainerEvent, newContainerEvent`

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

`activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, 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.event.INotifier

`addListener, getListeners, hasListeners, removeListener`

## Constructor Details

### ContainerElementList

public ContainerElementList(Class<ELEMENT> elementType, IManagedContainer container)

### ContainerElementList

public ContainerElementList(Class<ELEMENT> elementType)

## Method Details

### getContainer

public final IManagedContainer getContainer()

### getElementType

public final Class<ELEMENT> getElementType()

### isEmpty

public final boolean isEmpty()

Specified by:
  `isEmpty` in interface `IContainer<ELEMENT>`
Overrides:
  `isEmpty` in class `Container<ELEMENT>`

### getElements

public final ELEMENT[] getElements()

### forEachElement

public final boolean forEachElement(Predicate<ELEMENT> handler)

### initContainerElements

protected final void initContainerElements(String productGroup, String type, String description)

### initContainerElements

protected final void initContainerElements(String productGroup, String type)

### initContainerElements

protected final void initContainerElements(String productGroup)

### postProcessElementArray

protected ELEMENT[] postProcessElementArray(ELEMENT[] elements)

### getInitialElements

protected Object[] getInitialElements(IManagedContainer container)

### testElement

protected boolean testElement(Object object)

### doActivate

protected void doActivate() throws Exception

Overrides:
  `doActivate` in class `Lifecycle`
Throws:
  `Exception`

### doDeactivate

protected void doDeactivate() throws Exception

Overrides:
  `doDeactivate` in class `Lifecycle`
Throws:
  `Exception`