org.eclipse.emf.edit.provider
Class ItemProvider.ItemProviderNotifyingArrayList
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--org.eclipse.emf.common.util.BasicEList
|
+--org.eclipse.emf.common.notify.impl.NotifyingListImpl
|
+--org.eclipse.emf.edit.provider.ItemProvider.ItemProviderNotifyingArrayList
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, EList, java.util.List, NotifyingList, java.io.Serializable
- Enclosing class:
- ItemProvider
- public class ItemProvider.ItemProviderNotifyingArrayList
- extends NotifyingListImpl
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
Fields inherited from class java.util.AbstractList |
modCount |
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifyingListImpl |
addAllUnique, addAllUnique, addUnique, addUnique, basicAdd, basicRemove, basicSet, canContainNull, clear, getFeature, getFeatureID, getFeatureID, getNotifier, move, remove, removeAll, setUnique |
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 |
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 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.
isNotificationRequired
protected boolean isNotificationRequired()
- This always notifies.
- Overrides:
isNotificationRequired
in class NotifyingListImpl
- Following copied from class:
org.eclipse.emf.common.notify.impl.NotifyingListImpl
- Returns:
false
.
hasInverse
protected boolean hasInverse()
- This has an inverse
- Overrides:
hasInverse
in class NotifyingListImpl
- Following copied from class:
org.eclipse.emf.common.notify.impl.NotifyingListImpl
- Returns:
false
.
dispatchNotification
protected void dispatchNotification(Notification notification)
- This implementation directs the notification the containing item provider.
- Overrides:
dispatchNotification
in class NotifyingListImpl
- Following copied from class:
org.eclipse.emf.common.notify.impl.NotifyingListImpl
- Parameters:
notification
- the notification to dispatch.
createNotification
protected NotificationImpl createNotification(int eventType,
java.lang.Object oldObject,
java.lang.Object newObject,
int index)
- This implementation creates an
ItemProvider.ItemProviderNotification
.
- Overrides:
createNotification
in class NotifyingListImpl
- Following copied from class:
org.eclipse.emf.common.notify.impl.NotifyingListImpl
- Parameters:
eventType
- the type of change that has occurred.oldValue
- the value of the notifier's feature before the change occurred.newValue
- the value of the notifier's feature after the change occurred.index
- the position at which the change occurred.- Returns:
- a new notification.
inverseAdd
protected NotificationChain inverseAdd(java.lang.Object object,
NotificationChain notifications)
- This implementation will call
IUpdateableItemParent.setParent
, if appropriate.
- Overrides:
inverseAdd
in class NotifyingListImpl
- Following copied from class:
org.eclipse.emf.common.notify.impl.NotifyingListImpl
- 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
- Following copied from class:
org.eclipse.emf.common.notify.impl.NotifyingListImpl
- Parameters:
object
- the object that's been remove from the list.notifications
- the chain of accumulating notifications.- Returns:
- the
notifications
.