|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
org.eclipse.emf.common.util.DelegatingEList
org.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl
An extensible implementation of a notifying list that delegates to a backing list.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.emf.common.util.DelegatingEList |
DelegatingEList.EIterator, DelegatingEList.EListIterator, DelegatingEList.NonResolvingEIterator, DelegatingEList.NonResolvingEListIterator, DelegatingEList.UnmodifiableEList |
| Field Summary |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
DelegatingNotifyingListImpl()
Creates an empty instance. |
|
DelegatingNotifyingListImpl(Collection collection)
Creates an instance that is a copy of the collection. |
|
| Method Summary | |
boolean |
addAllUnique(Collection collection)
Adds each object of the collection to the end of the list; it does no uniqueness checking. |
boolean |
addAllUnique(int index,
Collection collection)
Adds each object of the collection at each successive index in the list and returns whether any objects were added; it does no ranging checking or uniqueness checking. |
void |
addUnique(int index,
Object object)
Adds the object at the given index in the list; it does no ranging checking or uniqueness checking. |
void |
addUnique(Object object)
Adds the object at the end of the list; it does no uniqueness checking. |
NotificationChain |
basicAdd(Object object,
NotificationChain notifications)
Adds the object at the end of the list and returns the potentially updated notification chain; it does no inverse updating.
|
NotificationChain |
basicRemove(Object object,
NotificationChain notifications)
Removes the object from the list and returns the potentially updated notification chain; it does no inverse updating.
|
NotificationChain |
basicSet(int index,
Object object,
NotificationChain notifications)
Sets the object at the index and returns the potentially updated notification chain; it does no inverse updating.
|
protected boolean |
canContainNull()
Returns ! |
void |
clear()
Clears the list of all objects. |
protected NotificationImpl |
createNotification(int eventType,
Object oldObject,
Object newObject,
int index)
|
protected NotificationImpl |
createNotification(int eventType,
Object oldObject,
Object newObject,
int index,
boolean wasSet)
Creates a notification. |
protected void |
dispatchNotification(Notification notification)
Dispatches a notification to the notifier of the list. |
Object |
getFeature()
Returns null. |
int |
getFeatureID()
Returns Notification.NO_FEATURE_ID. |
protected int |
getFeatureID(Class expectedClass)
Returns the result of calling getFeatureID(). |
Object |
getNotifier()
Returns null. |
protected boolean |
hasInverse()
Returns false. |
protected boolean |
hasShadow()
Returns false. |
protected NotificationChain |
inverseAdd(Object object,
NotificationChain notifications)
Does nothing and returns the notifications.
|
protected NotificationChain |
inverseRemove(Object object,
NotificationChain notifications)
Does nothing and returns the notifications.
|
protected boolean |
isNotificationRequired()
Returns false. |
protected boolean |
isSet()
Returns whether the list is considered set, i.e., whether it's not empty. |
Object |
move(int targetIndex,
int sourceIndex)
Moves the object at the source index of the list to the target index of the list and returns the moved object. |
Object |
remove(int index)
Removes the object at the index from the list and returns it. |
boolean |
removeAll(Collection collection)
Removes each object of the collection from the list and returns whether any object was actually contained by the list. |
Object |
setUnique(int index,
Object object)
Sets the object at the index and returns the old object at the index; it does no ranging checking or uniqueness checking. |
protected NotificationChain |
shadowAdd(Object object,
NotificationChain notifications)
Does nothing and returns the notifications.
|
protected NotificationChain |
shadowRemove(Object object,
NotificationChain notifications)
Does nothing and returns the notifications.
|
protected NotificationChain |
shadowSet(Object oldObject,
Object newObject,
NotificationChain notifications)
Does nothing and returns the notifications.
|
| Methods inherited from class org.eclipse.emf.common.util.DelegatingEList |
add, add, addAll, addAll, basicGet, basicIterator, basicList, basicListIterator, basicListIterator, contains, containsAll, delegateAdd, delegateAdd, delegateBasicList, delegateClear, delegateContains, delegateContainsAll, delegateEquals, delegateGet, delegateHashCode, delegateIndexOf, delegateIsEmpty, delegateIterator, delegateLastIndexOf, delegateList, delegateListIterator, delegateRemove, delegateSet, delegateSize, delegateToArray, delegateToArray, delegateToString, didAdd, didChange, didClear, didMove, didRemove, didSet, doClear, equalObjects, equals, get, getDuplicates, getNonDuplicates, hashCode, indexOf, isEmpty, isUnique, iterator, lastIndexOf, listIterator, listIterator, move, remove, resolve, retainAll, set, size, toArray, toArray, toString, useEquals, validate |
| Methods inherited from class java.util.AbstractList |
removeRange, subList |
| Methods inherited from class java.lang.Object |
clone, 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 |
public DelegatingNotifyingListImpl()
public DelegatingNotifyingListImpl(Collection collection)
collection - the initial contents of the list.| Method Detail |
public Object getNotifier()
null.
getNotifier in interface NotifyingListnull.public Object getFeature()
null.
getFeature in interface NotifyingListnull.Notification.getFeature()public int getFeatureID()
Notification.NO_FEATURE_ID.
getFeatureID in interface NotifyingListNotification.NO_FEATURE_ID.Notification.getFeatureID(java.lang.Class)protected int getFeatureID(Class expectedClass)
getFeatureID().
expectedClass - the class to which the ID is relative.
getFeatureID().protected boolean isSet()
protected boolean hasInverse()
false.
false.protected boolean canContainNull()
!hasInverse().
canContainNull in class DelegatingEList!hasInverse.protected boolean isNotificationRequired()
false.
false.protected boolean hasShadow()
false.
false.
protected NotificationChain shadowAdd(Object object,
NotificationChain notifications)
notifications.
Clients can override this to update the inverse of a bidirectional relation.
object - the object that's been added to the list.notifications - the chain of accumulating notifications.
notifications.
protected NotificationChain shadowRemove(Object object,
NotificationChain notifications)
notifications.
Clients can override this to update the inverse of a bidirectional relation.
object - the object that's been remove from the list.notifications - the chain of accumulating notifications.
notifications.
protected NotificationChain shadowSet(Object oldObject,
Object newObject,
NotificationChain notifications)
notifications.
Clients can override this to update the inverse of a bidirectional relation.
oldObject - the object that's been removed from the list.newObject - the object that's been added to the list.notifications - the chain of accumulating notifications.
notifications.
protected NotificationChain inverseAdd(Object object,
NotificationChain notifications)
notifications.
Clients can override this to update the inverse of a bidirectional relation.
object - the object that's been added to the list.notifications - the chain of accumulating notifications.
notifications.
protected NotificationChain inverseRemove(Object object,
NotificationChain notifications)
notifications.
Clients can override this to update the inverse of a bidirectional relation.
object - the object that's been remove from the list.notifications - the chain of accumulating notifications.
notifications.
protected NotificationImpl createNotification(int eventType,
Object oldObject,
Object newObject,
int index)
protected NotificationImpl createNotification(int eventType,
Object oldObject,
Object newObject,
int index,
boolean wasSet)
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.
protected void dispatchNotification(Notification notification)
notification - the notification to dispatch.public void addUnique(Object object)
required
and delegates to inverseAdd as required.
addUnique in class DelegatingEListobject - the object to be added.isNotificationRequired(),
hasInverse(),
inverseAdd(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)
public void addUnique(int index,
Object object)
required
and delegates to inverseAdd as required.
addUnique in class DelegatingEListobject - the object to be added.isNotificationRequired(),
hasInverse(),
inverseAdd(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)public boolean addAllUnique(Collection collection)
addAllUnique(int, Collection).
addAllUnique in class DelegatingEListcollection - the collection of objects to be added.inverseAdd(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)
public boolean addAllUnique(int index,
Collection collection)
required
and delegates to inverseAdd as required.
addAllUnique in class DelegatingEListindex - the index at which to add.collection - the collection of objects to be added.
isNotificationRequired(),
hasInverse(),
inverseAdd(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)
public NotificationChain basicAdd(Object object,
NotificationChain notifications)
inverse updating.
This implementation generates notifications as required.
object - the object to be added.
isNotificationRequired(),
hasInverse(),
inverseAdd(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)public Object remove(int index)
required
and delegates to inverseRemove as required.
remove in interface Listremove in class DelegatingEListindex - the position of the object to remove.
IndexOutOfBoundsException - if the index isn't within the size range.isNotificationRequired(),
hasInverse(),
inverseRemove(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)public boolean removeAll(Collection collection)
required
and delegates to inverseRemove as required.
removeAll in interface ListremoveAll in class DelegatingEListcollection - the collection of objects to be removed.
isNotificationRequired(),
hasInverse(),
inverseRemove(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)
public NotificationChain basicRemove(Object object,
NotificationChain notifications)
inverse updating.
This implementation generates notifications as required.
object - the object to be removed.
isNotificationRequired(),
hasInverse(),
inverseRemove(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)public void clear()
required
and delegates to inverseRemove as required.
clear in interface Listclear in class DelegatingEListisNotificationRequired(),
hasInverse(),
inverseRemove(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)
public Object setUnique(int index,
Object object)
required
and delegates to inverseAdd and inverseRemove as required.
setUnique in class DelegatingEListindex - the position in question.object - the object to set.
isNotificationRequired(),
hasInverse(),
inverseAdd(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain),
inverseRemove(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)
public NotificationChain basicSet(int index,
Object object,
NotificationChain notifications)
inverse updating.
This implementation generates notifications as required.
index - the position in question.object - the object to set.
isNotificationRequired(),
hasInverse(),
inverseAdd(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain),
inverseRemove(java.lang.Object, org.eclipse.emf.common.notify.NotificationChain)
public Object move(int targetIndex,
int sourceIndex)
required.
move in interface EListmove in class DelegatingEListtargetIndex - the new position for the object in the list.sourceIndex - the old position of the object in the list.
IndexOutOfBoundsException - if either index isn't within the size range.isNotificationRequired()
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||