protected class ResourceImpl.ContentsEList<E extends java.lang.Object & EObject> extends NotifyingInternalEListImpl<E> implements InternalEList<E>
Resource.getContents()
.BasicEList.BasicIndexOutOfBoundsException, BasicEList.EIterator<E1>, BasicEList.EListIterator<E1>, BasicEList.FastCompare<E>, BasicEList.NonResolvingEIterator<E1>, BasicEList.NonResolvingEListIterator<E1>, BasicEList.UnmodifiableEList<E>
InternalEList.Unsettable<E>
data, size
Modifier | Constructor and Description |
---|---|
protected |
ResourceImpl.ContentsEList() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.Object object)
Returns whether the list contains the object.
|
protected void |
didAdd(int index,
E object)
Called to indicate that an object has been added to the data storage.
|
protected void |
didClear(int oldSize,
java.lang.Object[] oldData)
Called to indicate that the data storage has been cleared.
|
protected void |
didRemove(int index,
E object)
Called to indicate that an object has been removed from the data storage.
|
protected void |
didSet(int index,
E newObject,
E oldObject)
Called to indicate that the data storage has been set.
|
int |
getFeatureID()
Returns
Notification.NO_FEATURE_ID . |
java.lang.Object |
getNotifier()
Returns
null . |
protected boolean |
hasInverse()
Returns
false . |
NotificationChain |
inverseAdd(E object,
NotificationChain notifications)
Does nothing and returns the
notifications . |
NotificationChain |
inverseRemove(E object,
NotificationChain notifications)
Does nothing and returns the
notifications . |
protected boolean |
isNotificationRequired()
Returns
false . |
protected boolean |
isUnique()
Returns whether objects are constrained to appear at most once in the list.
|
protected void |
loaded() |
protected void |
modified() |
protected java.lang.Object[] |
newData(int capacity)
Returns new allocated data storage.
|
protected boolean |
useEquals()
Returns whether
equals rather than == should be used to compare members. |
basicContains, basicContainsAll, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicToArray, basicToArray
addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, basicAdd, basicRemove, basicSet, canContainNull, clear, createNotification, createNotification, createNotificationChain, dispatchNotification, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddUnique, doAddUnique, doClear, doMove, doRemove, doRemoveAll, doSetUnique, getFeature, getFeatureID, hasShadow, isSet, move, remove, removeAll, resolve, setUnique, shadowAdd, shadowRemove, shadowSet
assign, basicGet, clone, data, get, grow, indexOf, isEmpty, lastIndexOf, primitiveGet, setData, shrink, size, toArray, toArray
add, add, addAll, addAll, didChange, didMove, equalObjects, equals, getDuplicates, getNonDuplicates, hashCode, iterator, listIterator, listIterator, move, remove, resolve, retainAll, set, toString, validate
finalize, getClass, notify, notifyAll, wait, wait, wait
addAllUnique, addAllUnique, addUnique, addUnique, basicAdd, basicContains, basicContainsAll, basicGet, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicRemove, basicToArray, basicToArray, setUnique
public java.lang.Object getNotifier()
NotifyingListImpl
null
.getNotifier
in interface NotifyingList<E extends java.lang.Object & EObject>
getNotifier
in class NotifyingListImpl<E extends java.lang.Object & EObject>
null
.public int getFeatureID()
NotifyingListImpl
Notification.NO_FEATURE_ID
.getFeatureID
in interface NotifyingList<E extends java.lang.Object & EObject>
getFeatureID
in class NotifyingListImpl<E extends java.lang.Object & EObject>
Notification.NO_FEATURE_ID
.Notification.getFeatureID(java.lang.Class<?>)
protected boolean isNotificationRequired()
NotifyingListImpl
false
.isNotificationRequired
in class NotifyingListImpl<E extends java.lang.Object & EObject>
false
.protected boolean useEquals()
AbstractEList
equals
rather than ==
should be used to compare members.
The default is to return true
but clients can optimize performance by returning false
.
The performance difference is highly significant.useEquals
in class AbstractEList<E extends java.lang.Object & EObject>
equals
rather than ==
should be used.protected boolean hasInverse()
NotifyingListImpl
false
.hasInverse
in class NotifyingListImpl<E extends java.lang.Object & EObject>
false
.protected boolean isUnique()
AbstractEList
false
, but clients can override this to ensure uniqueness of contents.
The performance impact is significant: operations such as add
are O(n) as a result requiring uniqueness.isUnique
in class AbstractEList<E extends java.lang.Object & EObject>
public NotificationChain inverseAdd(E object, NotificationChain notifications)
NotifyingListImpl
notifications
.
Clients can override this to update the inverse of a bidirectional relation.inverseAdd
in class NotifyingListImpl<E extends java.lang.Object & EObject>
object
- the object that's been added to the list.notifications
- the chain of accumulating notifications.notifications
.public NotificationChain inverseRemove(E object, NotificationChain notifications)
NotifyingListImpl
notifications
.
Clients can override this to update the inverse of a bidirectional relation.inverseRemove
in class NotifyingListImpl<E extends java.lang.Object & EObject>
object
- the object that's been remove from the list.notifications
- the chain of accumulating notifications.notifications
.protected java.lang.Object[] newData(int capacity)
BasicEList
newData
in class BasicEList<E extends java.lang.Object & EObject>
protected void didAdd(int index, E object)
AbstractEList
didAdd
in class AbstractEList<E extends java.lang.Object & EObject>
index
- the position object the new object.object
- the new object at the position.protected void didRemove(int index, E object)
AbstractEList
didRemove
in class AbstractEList<E extends java.lang.Object & EObject>
index
- the position of the old object.object
- the old object at the position.protected void didSet(int index, E newObject, E oldObject)
AbstractEList
didSet
in class AbstractEList<E extends java.lang.Object & EObject>
index
- the position that was set.newObject
- the new object at the position.oldObject
- the old object at the position.protected void didClear(int oldSize, java.lang.Object[] oldData)
AbstractEList
didRemove
for each object;
clients can use this to monitor clearing of the data storage.didClear
in class AbstractEList<E extends java.lang.Object & EObject>
oldSize
- the original size of the list.oldData
- the old data storage being discarded.AbstractEList.didRemove(int, E)
protected void loaded()
protected void modified()
public boolean contains(java.lang.Object object)
BasicEList
equals
or "=="
depending on useEquals
.contains
in interface java.util.Collection<E extends java.lang.Object & EObject>
contains
in interface java.util.List<E extends java.lang.Object & EObject>
contains
in class BasicEList<E extends java.lang.Object & EObject>
object
- the object in question.AbstractEList.useEquals()