## org.eclipse.uml2.common.util
Class DerivedEObjectEList<E>

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              java.util.AbstractSequentialList<E>
                  org.eclipse.uml2.common.util.DerivedEObjectEList<E>

All Implemented Interfaces:
  java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, org.eclipse.emf.common.util.EList<E>, org.eclipse.emf.ecore.EStructuralFeature.Setting, org.eclipse.emf.ecore.util.InternalEList<E>, org.eclipse.emf.ecore.util.InternalEList.Unsettable<E>

Direct Known Subclasses:
  DerivedSubsetEObjectEList, DerivedUnionEObjectEList

    public class DerivedEObjectEList<E>

extends java.util.AbstractSequentialList<E>
implements org.eclipse.emf.ecore.EStructuralFeature.Setting, org.eclipse.emf.ecore.util.InternalEList.Unsettable<E>

A list whose contents are derived (dynamically using a "smart" iterator) from the values of other features in a trivial way (e.g. by type). The default implementation does not support modification.

Since:
  1.2

Nested Class Summary
`protected class` `DerivedEObjectEList.DerivedListIterator`
`protected class` `DerivedEObjectEList.EmptyDerivedListIterator`
`protected class` `DerivedEObjectEList.ResolvingDerivedListIterator`

Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.util.InternalEList
`org.eclipse.emf.ecore.util.InternalEList.Unsettable<E>`

Field Summary
`protected java.lang.Class<?>` `dataClass`
`protected int` `featureID`
`protected org.eclipse.emf.ecore.InternalEObject` `owner`
`protected int[]` `sourceFeatureIDs`

Fields inherited from class java.util.AbstractList
`modCount`

Constructor Summary
`DerivedEObjectEList(java.lang.Class<?> dataClass, org.eclipse.emf.ecore.InternalEObject owner, int featureID, int[] sourceFeatureIDs)`

Method Summary
`void` `add(int index, E object)`
`boolean` `addAll(int index, java.util.Collection<? extends E> objects)`
`boolean` `addAllUnique(int index, java.util.Collection<? extends E> objects)`
`void` `addUnique(E object)`
`void` `addUnique(int index, E object)`
`org.eclipse.emf.common.notify.NotificationChain` `basicAdd(E object, org.eclipse.emf.common.notify.NotificationChain notifications)`
`E` `basicGet(int index)`
`java.util.Iterator<E>` `basicIterator()`
`java.util.List<E>` `basicList()`
`java.util.ListIterator<E>` `basicListIterator()`
`java.util.ListIterator<E>` `basicListIterator(int index)`
`org.eclipse.emf.common.notify.NotificationChain` `basicRemove(java.lang.Object object, org.eclipse.emf.common.notify.NotificationChain notifications)`
`boolean` `contains(java.lang.Object object)`
`protected org.eclipse.emf.common.notify.impl.NotificationImpl` `createNotification(int eventType, java.lang.Object oldObject, java.lang.Object newObject, int index, boolean wasSet)`
`protected E` `derive(java.lang.Object object)` Derives a value for this list from the specified element in a source feature.
`protected void` `dispatchNotification(org.eclipse.emf.common.notify.Notification notification)`
`protected boolean` `doAddAllUnique(int index, java.util.Collection<? extends E> objects)`
`java.lang.Object` `get(boolean resolve)`
`org.eclipse.emf.ecore.EObject` `getEObject()`
`org.eclipse.emf.ecore.EStructuralFeature` `getEStructuralFeature()`
`org.eclipse.emf.ecore.EStructuralFeature` `getEStructuralFeature(int featureID)`
`boolean` `isEmpty()`
`protected boolean` `isIncluded(org.eclipse.emf.ecore.EStructuralFeature feature)` Indicates whether all elements from the specified source feature are included in this list.
`protected boolean` `isIncluded(java.lang.Object object)` Indicates whether the specified element from a source feature is included in this list.
`protected boolean` `isNotificationRequired()`
`boolean` `isSet()`
`java.util.ListIterator<E>` `listIterator(int index)`
`protected java.util.ListIterator<E>` `listIterator(int index, boolean resolve)`
`E` `move(int newPosition, int oldPosition)`
`void` `move(int newPosition, java.lang.Object object)`
`protected java.util.ListIterator<E>` `newEmptyListIterator()`
`protected java.util.ListIterator<E>` `newListIterator()`
`protected java.util.ListIterator<E>` `newResolvingListIterator()`
`E` `remove(int index)`
`E` `set(int index, E object)`
`void` `set(java.lang.Object newValue)`
`E` `setUnique(int index, E object)`
`int` `size()`
`void` `unset()`
`protected E` `validate(int index, E object)`

Methods inherited from class java.util.AbstractSequentialList
`get, iterator`

Methods inherited from class java.util.AbstractList
`add, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList`

Methods inherited from class java.util.AbstractCollection
`addAll, containsAll, remove, removeAll, retainAll, toArray, toArray, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.List
`add, addAll, clear, containsAll, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, remove, removeAll, retainAll, subList, toArray, toArray`

Field Detail

### dataClass

    protected final java.lang.Class<?> dataClass

### owner

    protected final org.eclipse.emf.ecore.InternalEObject owner

### featureID

    protected final int featureID

### sourceFeatureIDs

    protected final int[] sourceFeatureIDs

Constructor Detail

### DerivedEObjectEList

    public DerivedEObjectEList(java.lang.Class<?> dataClass,
                               org.eclipse.emf.ecore.InternalEObject owner,
                               int featureID,
                               int[] sourceFeatureIDs)

Method Detail

### get

    public java.lang.Object get(boolean resolve)

  Specified by:
    `get` in interface `org.eclipse.emf.ecore.EStructuralFeature.Setting`

### getEObject

    public org.eclipse.emf.ecore.EObject getEObject()

  Specified by:
    `getEObject` in interface `org.eclipse.emf.ecore.EStructuralFeature.Setting`

### getEStructuralFeature

    public org.eclipse.emf.ecore.EStructuralFeature getEStructuralFeature()

  Specified by:
    `getEStructuralFeature` in interface `org.eclipse.emf.ecore.EStructuralFeature.Setting`

### getEStructuralFeature

    public org.eclipse.emf.ecore.EStructuralFeature getEStructuralFeature(int featureID)

### isSet

    public boolean isSet()

  Specified by:
    `isSet` in interface `org.eclipse.emf.ecore.EStructuralFeature.Setting`
  Specified by:
    `isSet` in interface `org.eclipse.emf.ecore.util.InternalEList.Unsettable<E>`

### set

    public void set(java.lang.Object newValue)

  Specified by:
    `set` in interface `org.eclipse.emf.ecore.EStructuralFeature.Setting`

### unset

    public void unset()

  Specified by:
    `unset` in interface `org.eclipse.emf.ecore.EStructuralFeature.Setting`
  Specified by:
    `unset` in interface `org.eclipse.emf.ecore.util.InternalEList.Unsettable<E>`

### listIterator

    public java.util.ListIterator<E> listIterator(int index)

  Specified by:
    `listIterator` in interface `java.util.List<E>`
  Specified by:
    `listIterator` in class `java.util.AbstractSequentialList<E>`

### size

    public int size()

  Specified by:
    `size` in interface `java.util.Collection<E>`
  Specified by:
    `size` in interface `java.util.List<E>`
  Specified by:
    `size` in class `java.util.AbstractCollection<E>`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `java.util.Collection<E>`
  Specified by:
    `isEmpty` in interface `java.util.List<E>`
  Overrides:
    `isEmpty` in class `java.util.AbstractCollection<E>`

### contains

    public boolean contains(java.lang.Object object)

  Specified by:
    `contains` in interface `java.util.Collection<E>`
  Specified by:
    `contains` in interface `java.util.List<E>`
  Overrides:
    `contains` in class `java.util.AbstractCollection<E>`

### basicGet

    public E basicGet(int index)

  Specified by:
    `basicGet` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### basicList

    public java.util.List<E> basicList()

  Specified by:
    `basicList` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### basicIterator

    public java.util.Iterator<E> basicIterator()

  Specified by:
    `basicIterator` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### basicListIterator

    public java.util.ListIterator<E> basicListIterator()

  Specified by:
    `basicListIterator` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### basicListIterator

    public java.util.ListIterator<E> basicListIterator(int index)

  Specified by:
    `basicListIterator` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### basicRemove

    public org.eclipse.emf.common.notify.NotificationChain basicRemove(java.lang.Object object,
                                                                       org.eclipse.emf.common.notify.NotificationChain notifications)

  Specified by:
    `basicRemove` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### isNotificationRequired

    protected boolean isNotificationRequired()

### createNotification

    protected org.eclipse.emf.common.notify.impl.NotificationImpl createNotification(int eventType,
                                                                                     java.lang.Object oldObject,
                                                                                     java.lang.Object newObject,
                                                                                     int index,
                                                                                     boolean wasSet)

### dispatchNotification

    protected void dispatchNotification(org.eclipse.emf.common.notify.Notification notification)

### basicAdd

    public org.eclipse.emf.common.notify.NotificationChain basicAdd(E object,
                                                                    org.eclipse.emf.common.notify.NotificationChain notifications)

  Specified by:
    `basicAdd` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### add

    public void add(int index,
                    E object)

  Specified by:
    `add` in interface `java.util.List<E>`
  Overrides:
    `add` in class `java.util.AbstractSequentialList<E>`

### addUnique

    public void addUnique(E object)

  Specified by:
    `addUnique` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### addUnique

    public void addUnique(int index,
                          E object)

  Specified by:
    `addUnique` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### addAll

    public boolean addAll(int index,
                          java.util.Collection<? extends E> objects)

  Specified by:
    `addAll` in interface `java.util.List<E>`
  Overrides:
    `addAll` in class `java.util.AbstractSequentialList<E>`

### addAllUnique

    public boolean addAllUnique(int index,
                                java.util.Collection<? extends E> objects)

### doAddAllUnique

    protected boolean doAddAllUnique(int index,
                                     java.util.Collection<? extends E> objects)

### remove

    public E remove(int index)

  Specified by:
    `remove` in interface `java.util.List<E>`
  Overrides:
    `remove` in class `java.util.AbstractSequentialList<E>`

### set

    public E set(int index,
                 E object)

  Specified by:
    `set` in interface `java.util.List<E>`
  Overrides:
    `set` in class `java.util.AbstractSequentialList<E>`

### setUnique

    public E setUnique(int index,
                       E object)

  Specified by:
    `setUnique` in interface `org.eclipse.emf.ecore.util.InternalEList<E>`

### move

    public void move(int newPosition,
                     java.lang.Object object)

  Specified by:
    `move` in interface `org.eclipse.emf.common.util.EList<E>`

### move

    public E move(int newPosition,
                  int oldPosition)

  Specified by:
    `move` in interface `org.eclipse.emf.common.util.EList<E>`

### isIncluded

    protected boolean isIncluded(org.eclipse.emf.ecore.EStructuralFeature feature)

  Indicates whether all elements from the specified source feature are included in this list.

  Parameters:
    `feature` - A source feature.
  Returns:
    `true` if the elements are included; `false` otherwise.

### isIncluded

    protected boolean isIncluded(java.lang.Object object)

  Indicates whether the specified element from a source feature is included in this list.

  Parameters:
    `object` - An element from a source feature.
  Returns:
    `true` if the element is included; `false` otherwise.

### derive

    protected E derive(java.lang.Object object)

  Derives a value for this list from the specified element in a source feature.

  Parameters:
    `object` - An element from a source feature.
  Returns:
    The "derived" value of the specified element.

### validate

    protected E validate(int index,
                         E object)

### newListIterator

    protected java.util.ListIterator<E> newListIterator()

### newResolvingListIterator

    protected java.util.ListIterator<E> newResolvingListIterator()

### newEmptyListIterator

    protected java.util.ListIterator<E> newEmptyListIterator()

### listIterator

    protected java.util.ListIterator<E> listIterator(int index,
                                                     boolean resolve)

Copyright 2003, 2007 IBM Corporation and others. All Rights Reserved.