|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
org.eclipse.emf.common.util.AbstractEList<E>
org.eclipse.emf.common.util.BasicEList<E>
org.eclipse.emf.common.notify.impl.NotifyingListImpl<E>
org.eclipse.emf.ecore.util.NotifyingInternalEListImpl<E>
org.eclipse.emf.ecore.util.EcoreEList<E>
E - public abstract class EcoreEList<E>
A notifying internal EList that implements InternalEList and EStructuralFeature.Setting.
At least one of getEStructuralFeature() or getFeatureID() must be specialized
since each delegates to the other and without specialization this will lead to stack overflow.
| Nested Class Summary | |
|---|---|
static class |
EcoreEList.Dynamic<E>
|
static class |
EcoreEList.Generic<E>
An Ecore EList with an implementation for exhibiting the appropriate feature behaviour as well as for tracking the unset state. |
static class |
EcoreEList.UnmodifiableEList<E>
|
| 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> |
| Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.util.InternalEList |
|---|
InternalEList.Unsettable<E> |
| Field Summary | |
|---|---|
protected java.lang.Class<?> |
dataClass
|
protected InternalEObject |
owner
|
| Fields inherited from class org.eclipse.emf.common.util.BasicEList |
|---|
data, size |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
EcoreEList(java.lang.Class<?> dataClass,
InternalEObject owner)
|
|
| Method Summary | ||
|---|---|---|
boolean |
contains(java.lang.Object object)
Resolve to compare objects but do not modify list |
|
protected NotificationImpl |
createNotification(int eventType,
boolean oldValue,
boolean newValue)
|
|
protected NotificationImpl |
createNotification(int eventType,
java.lang.Object oldObject,
java.lang.Object newObject,
int index,
boolean wasSet)
Creates a notification. |
|
protected void |
dispatchNotification(Notification notification)
Dispatches a notification to the notifier of the list. |
|
java.lang.Object |
get(boolean resolve)
Returns the value held by the feature of the object; it optionally resolves the value. |
|
EObject |
getEObject()
Returns the object holding a value. |
|
EStructuralFeature |
getEStructuralFeature()
Returns the specific feature holding a value for the object. |
|
java.lang.Object |
getFeature()
Returns null. |
|
int |
getFeatureID()
Returns Notification.NO_FEATURE_ID. |
|
protected EClassifier |
getFeatureType()
|
|
protected EReference |
getInverseEReference()
|
|
protected java.lang.Class<?> |
getInverseFeatureClass()
|
|
protected int |
getInverseFeatureID()
|
|
java.lang.Object |
getNotifier()
Returns null. |
|
protected boolean |
hasInstanceClass()
|
|
protected boolean |
hasManyInverse()
|
|
protected boolean |
hasNavigableInverse()
|
|
protected boolean |
hasProxies()
|
|
int |
indexOf(java.lang.Object object)
Returns the position of the first occurrence of the object in the list. |
|
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 |
isContainment()
|
|
protected boolean |
isEObject()
|
|
protected boolean |
isInstance(java.lang.Object object)
|
|
protected boolean |
isNotificationRequired()
Returns false. |
|
boolean |
isSet()
Returns whether the list is considered set, i.e., whether it's not empty. |
|
int |
lastIndexOf(java.lang.Object object)
Returns the position of the last occurrence of the object in the list. |
|
protected java.lang.Object[] |
newData(int capacity)
Returns new allocated data storage. |
|
protected E |
resolve(E object)
Returns the resolved object from this list for the purpose of testing whether NotifyingListImpl.removeAll(Collection) applies to it. |
|
protected E |
resolve(int index,
E object)
Resolves the object at the index and returns the result. |
|
protected EObject |
resolve(int index,
EObject eObject)
|
|
protected EObject |
resolveProxy(EObject eObject)
|
|
void |
set(java.lang.Object newValue)
Set the value held by the feature of the object. |
|
java.lang.Object[] |
toArray()
Returns an array containing all the objects in sequence. |
|
|
toArray(T[] array)
Returns an array containing all the objects in sequence. |
|
void |
unset()
Unsets the value held by the feature of the object. |
|
protected E |
validate(int index,
E object)
Validates a new content object and returns the validated object. |
|
| Methods inherited from class org.eclipse.emf.ecore.util.NotifyingInternalEListImpl |
|---|
basicContains, basicContainsAll, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicToArray, basicToArray |
| Methods inherited from class org.eclipse.emf.common.notify.impl.NotifyingListImpl |
|---|
addAllUnique, addAllUnique, addAllUnique, addAllUnique, addUnique, addUnique, basicAdd, basicRemove, basicSet, canContainNull, clear, createNotification, createNotificationChain, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddUnique, doAddUnique, doClear, doMove, doRemove, doRemoveAll, doSetUnique, getFeatureID, hasInverse, hasShadow, move, remove, removeAll, setUnique, shadowAdd, shadowRemove, shadowSet |
| Methods inherited from class org.eclipse.emf.common.util.BasicEList |
|---|
assign, basicGet, clone, data, get, grow, isEmpty, primitiveGet, setData, shrink, size |
| Methods inherited from class org.eclipse.emf.common.util.AbstractEList |
|---|
add, add, addAll, addAll, didAdd, didChange, didClear, didMove, didRemove, didSet, equalObjects, equals, getDuplicates, getNonDuplicates, hashCode, isUnique, iterator, listIterator, listIterator, move, remove, retainAll, set, toString, useEquals |
| Methods inherited from class java.util.AbstractList |
|---|
removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.emf.ecore.util.InternalEList |
|---|
addAllUnique, addAllUnique, addUnique, addUnique, basicAdd, basicContains, basicContainsAll, basicGet, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicRemove, basicToArray, basicToArray, setUnique |
| Methods inherited from interface org.eclipse.emf.common.util.EList |
|---|
move, move |
| Methods inherited from interface java.util.List |
|---|
add, add, addAll, addAll, clear, containsAll, equals, get, hashCode, isEmpty, iterator, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList |
| Field Detail |
|---|
protected final java.lang.Class<?> dataClass
protected final InternalEObject owner
| Constructor Detail |
|---|
public EcoreEList(java.lang.Class<?> dataClass,
InternalEObject owner)
| Method Detail |
|---|
protected java.lang.Object[] newData(int capacity)
BasicEList
newData in class BasicEList<E>
protected E validate(int index,
E object)
AbstractEListnecessary and returns the argument object.
Clients may throw additional types of runtime exceptions
in order to handle constraint violations.
validate in class AbstractEList<E>index - the position of the new content.object - the new content.
protected boolean isInstance(java.lang.Object object)
public java.lang.Object getNotifier()
NotifyingListImplnull.
getNotifier in interface NotifyingList<E>getNotifier in class NotifyingListImpl<E>null.public java.lang.Object getFeature()
NotifyingListImplnull.
getFeature in interface NotifyingList<E>getFeature in class NotifyingListImpl<E>null.Notification.getFeature()public int getFeatureID()
NotifyingListImplNotification.NO_FEATURE_ID.
getFeatureID in interface NotifyingList<E>getFeatureID in class NotifyingListImpl<E>Notification.NO_FEATURE_ID.Notification.getFeatureID(java.lang.Class>)public EStructuralFeature getEStructuralFeature()
EStructuralFeature.Setting
getEStructuralFeature in interface EStructuralFeature.Settingprotected EClassifier getFeatureType()
protected EReference getInverseEReference()
protected int getInverseFeatureID()
protected java.lang.Class<?> getInverseFeatureClass()
protected boolean hasManyInverse()
protected boolean hasNavigableInverse()
protected boolean isEObject()
protected boolean isContainment()
protected boolean hasProxies()
protected boolean hasInstanceClass()
protected E resolve(int index,
E object)
AbstractEListobject;
clients can use this to transform objects as they are fetched.
resolve in class AbstractEList<E>index - the position of the content.object - the content.
protected EObject resolve(int index,
EObject eObject)
protected E resolve(E object)
NotifyingListImplNotifyingListImpl.removeAll(Collection) applies to it.
resolve in class NotifyingListImpl<E>object - the object to be resolved.
protected EObject resolveProxy(EObject eObject)
public java.lang.Object[] toArray()
BasicEListnewData to create typed storage in this case.
toArray in interface java.util.Collection<E>toArray in interface java.util.List<E>toArray in class BasicEList<E>BasicEList.newData(int)public <T> T[] toArray(T[] array)
BasicEList
toArray in interface java.util.Collection<E>toArray in interface java.util.List<E>toArray in class BasicEList<E>array - the array that will be filled and returned, if it's big enough;
otherwise, a suitably large array of the same type will be allocated and used instead.
BasicEList.newData(int)
protected NotificationImpl createNotification(int eventType,
java.lang.Object oldObject,
java.lang.Object newObject,
int index,
boolean wasSet)
NotifyingListImpl
createNotification in class NotifyingListImpl<E>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 NotificationImpl createNotification(int eventType,
boolean oldValue,
boolean newValue)
protected void dispatchNotification(Notification notification)
NotifyingListImpl
dispatchNotification in class NotifyingListImpl<E>notification - the notification to dispatch.protected boolean isNotificationRequired()
NotifyingListImplfalse.
isNotificationRequired in class NotifyingListImpl<E>false.
public NotificationChain inverseAdd(E object,
NotificationChain notifications)
NotifyingListImplnotifications.
Clients can override this to update the inverse of a bidirectional relation.
inverseAdd in class NotifyingListImpl<E>object - the object that's been added to the list.notifications - the chain of accumulating notifications.
notifications.
public NotificationChain inverseRemove(E object,
NotificationChain notifications)
NotifyingListImplnotifications.
Clients can override this to update the inverse of a bidirectional relation.
inverseRemove in class NotifyingListImpl<E>object - the object that's been remove from the list.notifications - the chain of accumulating notifications.
notifications.public boolean contains(java.lang.Object object)
contains in interface java.util.Collection<E>contains in interface java.util.List<E>contains in class BasicEList<E>object - the object in question.
AbstractEList.useEquals()public int indexOf(java.lang.Object object)
BasicEListequals or "==" depending on useEquals.
indexOf in interface java.util.List<E>indexOf in class BasicEList<E>object - the object in question.
public int lastIndexOf(java.lang.Object object)
BasicEListequals or "==" depending on useEquals.
lastIndexOf in interface java.util.List<E>lastIndexOf in class BasicEList<E>object - the object in question.
public EObject getEObject()
EStructuralFeature.Setting
getEObject in interface EStructuralFeature.Settingpublic java.lang.Object get(boolean resolve)
EStructuralFeature.Settingresolves the value.
get in interface EStructuralFeature.Settingresolve - whether to resolve.
EObject.eGet(EStructuralFeature, boolean)public void set(java.lang.Object newValue)
EStructuralFeature.Setting
set in interface EStructuralFeature.SettingnewValue - the newValue.EObject.eSet(EStructuralFeature, Object)public boolean isSet()
NotifyingListImpl
isSet in interface EStructuralFeature.SettingisSet in interface InternalEList.Unsettable<E>isSet in class NotifyingListImpl<E>EObject.eIsSet(EStructuralFeature)public void unset()
EStructuralFeature.Setting
unset in interface EStructuralFeature.Settingunset in interface InternalEList.Unsettable<E>EObject.eUnset(EStructuralFeature)
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||