## org.eclipse.emf.edit.provider
Class ItemProvider.ItemProviderNotifyingArrayList<E>

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractList<E>
              org.eclipse.emf.common.util.BasicEList<E>
                  org.eclipse.emf.common.notify.impl.NotifyingListImpl<E>
                      org.eclipse.emf.edit.provider.ItemProvider.ItemProviderNotifyingArrayList<E>

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess, NotifyingList<E>, EList<E>

Enclosing class:
  ItemProvider

    public class ItemProvider.ItemProviderNotifyingArrayList<E>

extends NotifyingListImpl<E>

This class overrides the "notify" methods to fire `INotifyChangedListener` calls and it overrides the "inverse basic" methods to maintain referential integrity by calling `IUpdateableItemParent.setParent`.

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.emf.common.util.BasicEList
`BasicEList.BasicIndexOutOfBoundsException, BasicEList.EIterator<E1>, BasicEList.EListIterator<E1>, BasicEList.FastCompare<E>, BasicEList.NonResolvingEIterator<E1>, BasicEList.NonResolvingEListIterator<E1>, BasicEList.UnmodifiableEList<E>`

Field Summary

Fields inherited from class org.eclipse.emf.common.util.BasicEList
`data, size`

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

Constructor Summary
`ItemProvider.ItemProviderNotifyingArrayList()` This constructs an empty instance.
`ItemProvider.ItemProviderNotifyingArrayList(java.util.Collection<? extends E> collection)` This constructs an instance with the same initial content as the given collection.
`ItemProvider.ItemProviderNotifyingArrayList(int initialCapacity)` This constructs an instance with this initial capacity.

Method Summary
`protected NotificationImpl` `createNotification(int eventType, java.lang.Object oldObject, java.lang.Object newObject, int index, boolean wasSet)` This implementation creates an `ItemProvider.ItemProviderNotification`.
`protected NotificationChain` `createNotificationChain(int capacity)` Creates a notification chain, if the expected capacity exceeds the threshold at which a list is better than chaining individual notification instances.
`protected void` `dispatchNotification(Notification notification)` This implementation directs the notification the containing item provider.
`protected boolean` `hasInverse()` This has an inverse
`protected NotificationChain` `inverseAdd(java.lang.Object object, NotificationChain notifications)` This implementation will call `IUpdateableItemParent.setParent`, if appropriate.
`protected NotificationChain` `inverseRemove(java.lang.Object object, NotificationChain notifications)` This implementation will call `IUpdateableItemParent.setParent`, if appropriate.
`protected boolean` `isNotificationRequired()` This always notifies.

Methods inherited from class org.eclipse.emf.common.notify.impl.NotifyingListImpl

`addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, basicAdd, basicRemove, basicSet, canContainNull, clear, createNotification, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddUnique, doAddUnique, doClear, doMove, doRemove, doRemoveAll, doSetUnique, getFeature, getFeatureID, getFeatureID, getNotifier, hasShadow, isSet, move, remove, removeAll, resolve, setUnique, shadowAdd, shadowRemove, shadowSet`

Methods inherited from class org.eclipse.emf.common.util.BasicEList

`add, add, addAll, addAll, assign, basicGet, basicIterator, basicList, basicListIterator, basicListIterator, clone, contains, containsAll, data, didAdd, didChange, didClear, didMove, didRemove, didSet, equalObjects, equals, get, getDuplicates, getNonDuplicates, grow, hashCode, indexOf, isEmpty, isUnique, iterator, lastIndexOf, listIterator, listIterator, move, newData, remove, resolve, retainAll, set, setData, shrink, size, toArray, toArray, toString, useEquals, validate`

Methods inherited from class java.util.AbstractList
`removeRange, subList`

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

Methods inherited from interface org.eclipse.emf.common.util.EList
`move`

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

Constructor Detail

### ItemProvider.ItemProviderNotifyingArrayList

    public ItemProvider.ItemProviderNotifyingArrayList()

  This constructs an empty instance.

### ItemProvider.ItemProviderNotifyingArrayList

    public ItemProvider.ItemProviderNotifyingArrayList(int initialCapacity)

  This constructs an instance with this initial capacity.

### ItemProvider.ItemProviderNotifyingArrayList

    public ItemProvider.ItemProviderNotifyingArrayList(java.util.Collection<? extends E> collection)

  This constructs an instance with the same initial content as the given collection. Note that the add methods are called to do this and hence calls to basic methods are produced. This means there will be notification, but you can make sure the domain notifier is null during this constructor invocation to change that behaviour. All the basic item provider constructors ensure that no domain events are fired.

Method Detail

### isNotificationRequired

    protected boolean isNotificationRequired()

  This always notifies.

  Overrides:
    `isNotificationRequired` in class `NotifyingListImpl<E>`
  Returns:
    `false`.

### hasInverse

    protected boolean hasInverse()

  This has an inverse

  Overrides:
    `hasInverse` in class `NotifyingListImpl<E>`
  Returns:
    `false`.

### dispatchNotification

    protected void dispatchNotification(Notification notification)

  This implementation directs the notification the containing item provider.

  Overrides:
    `dispatchNotification` in class `NotifyingListImpl<E>`
  Parameters:
    `notification` - the notification to dispatch.

### createNotification

    protected NotificationImpl createNotification(int eventType,
                                                  java.lang.Object oldObject,
                                                  java.lang.Object newObject,
                                                  int index,
                                                  boolean wasSet)

  This implementation creates an `ItemProvider.ItemProviderNotification`.

  Overrides:
    `createNotification` in class `NotifyingListImpl<E>`
  Parameters:
    `eventType` - the type of change that has occurred.
    `oldObject` - the value of the notifier's feature before the change occurred.
    `newObject` - the value of the notifier's feature after the change occurred.
    `index` - the position at which the change occurred.
  Returns:
    a new notification.

### createNotificationChain

    protected NotificationChain createNotificationChain(int capacity)

  Description copied from class: `NotifyingListImpl`
  Creates a notification chain, if the expected capacity exceeds the threshold at which a list is better than chaining individual notification instances.

  Overrides:
    `createNotificationChain` in class `NotifyingListImpl<E>`

### inverseAdd

    protected NotificationChain inverseAdd(java.lang.Object object,
                                           NotificationChain notifications)

  This implementation will call `IUpdateableItemParent.setParent`, if appropriate.

  Overrides:
    `inverseAdd` in class `NotifyingListImpl<E>`
  Parameters:
    `object` - the object that's been added to the list.
    `notifications` - the chain of accumulating notifications.
  Returns:
    the `notifications`.

### inverseRemove

    protected NotificationChain inverseRemove(java.lang.Object object,
                                              NotificationChain notifications)

  This implementation will call `IUpdateableItemParent.setParent`, if appropriate.

  Overrides:
    `inverseRemove` in class `NotifyingListImpl<E>`
  Parameters:
    `object` - the object that's been remove from the list.
    `notifications` - the chain of accumulating notifications.
  Returns:
    the `notifications`.

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.