org.eclipse.emf.ecore.util
Class EcoreDynamicEList
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.ecore.util.EcoreEList
|
+--org.eclipse.emf.ecore.util.EcoreDynamicEList
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, EList, EStructuralFeature.Setting, EStructuralFeature.Setting.Internal, InternalEList, java.util.List, NotifyingList, java.io.Serializable
- public class EcoreDynamicEList
- extends EcoreEList
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Methods inherited from class org.eclipse.emf.ecore.util.EcoreEList |
basicIterator, basicList, basicListIterator, basicListIterator, contains, createNotification, dispatchNotification, getEObject, getFeature, getFeatureID, getInverseEStructuralFeature, getInverseFeatureClass, getInverseFeatureID, getNotifier, indexOf, isNotificationRequired, lastIndexOf, newData, resolve, toArray, toArray |
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifyingListImpl |
addAllUnique, addAllUnique, addUnique, addUnique, basicSet, clear, createNotificationChain, getFeatureID, move, remove, removeAll, setUnique |
Methods inherited from class org.eclipse.emf.common.util.BasicEList |
add, add, addAll, addAll, assign, clone, containsAll, data, didAdd, didChange, didClear, didMove, didRemove, didSet, equalObjects, equals, get, getDuplicates, getNonDuplicates, grow, hashCode, isEmpty, iterator, listIterator, listIterator, move, remove, retainAll, set, shrink, size, toString, useEquals |
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, 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 |
eClassifier
protected EClassifier eClassifier
eStructuralFeature
protected EStructuralFeature eStructuralFeature
HAS_MANY_INVERSE
public static final int HAS_MANY_INVERSE
HAS_NAVIGABLE_INVERSE
public static final int HAS_NAVIGABLE_INVERSE
IS_EOBJECT
public static final int IS_EOBJECT
IS_CONTAINMENT
public static final int IS_CONTAINMENT
IS_UNIQUE
public static final int IS_UNIQUE
HAS_PROXIES
public static final int HAS_PROXIES
IS_MANY
public static final int IS_MANY
HAS_INSTANCE_CLASS
public static final int HAS_INSTANCE_CLASS
IS_CONTAINER
public static final int IS_CONTAINER
IS_UNSETTABLE
public static final int IS_UNSETTABLE
IS_PRIMITIVE
public static final int IS_PRIMITIVE
IS_ENUM
public static final int IS_ENUM
IS_SET
public static final int IS_SET
kind
protected int kind
EcoreDynamicEList
public EcoreDynamicEList(EStructuralFeature eStructuralFeature,
InternalEObject owner)
EcoreDynamicEList
public EcoreDynamicEList(int kind,
EStructuralFeature eStructuralFeature,
InternalEObject owner)
EcoreDynamicEList
protected EcoreDynamicEList(java.lang.Class instanceClass,
InternalEObject owner)
wrapperClassFor
public static java.lang.Class wrapperClassFor(java.lang.Class javaClass)
getDefaultValue
public java.lang.Object getDefaultValue()
getEStructuralFeature
public EStructuralFeature getEStructuralFeature()
- Description copied from interface:
EStructuralFeature.Setting
- Returns the specific feature holding a value for the object.
- Overrides:
getEStructuralFeature
in class EcoreEList
- Following copied from interface:
org.eclipse.emf.ecore.EStructuralFeature.Setting
- Returns:
- the specific feature holding a value for the object.
validate
protected java.lang.Object validate(int index,
java.lang.Object object)
- Description copied from class:
BasicEList
- Validates a new content object and returns the validated object.
This implementation checks for null, if
necessary
and returns the argument object.
Clients may throw additional types of runtime exceptions
in order to handle constraint violations.
- Overrides:
validate
in class BasicEList
- Following copied from class:
org.eclipse.emf.common.util.BasicEList
- Parameters:
index
- the position of the new content.object
- the new content.- Throws:
java.lang.IllegalArgumentException
- if a constraint prevents the object from being added.
hasInverse
protected boolean hasInverse()
- Description copied from class:
NotifyingListImpl
- Returns
false
.
- Overrides:
hasInverse
in class NotifyingListImpl
- Following copied from class:
org.eclipse.emf.common.notify.impl.NotifyingListImpl
- Returns:
false
.
hasManyInverse
protected boolean hasManyInverse()
- Overrides:
hasManyInverse
in class EcoreEList
hasNavigableInverse
protected boolean hasNavigableInverse()
- Overrides:
hasNavigableInverse
in class EcoreEList
isEObject
protected boolean isEObject()
- Overrides:
isEObject
in class EcoreEList
isContainment
protected boolean isContainment()
- Overrides:
isContainment
in class EcoreEList
isUnique
protected boolean isUnique()
- Description copied from class:
BasicEList
- Returns whether objects are constrained to appear at most once in the list.
The default is to return
false
, but clients can override this to ensure uniqueness of contents.
The performance impact is signifcant: operations such as add
are O(n) as a result requiring uniqueness.
- Overrides:
isUnique
in class BasicEList
- Following copied from class:
org.eclipse.emf.common.util.BasicEList
- Returns:
- whether objects are constrained to appear at most once in the list.
hasProxies
protected boolean hasProxies()
- Overrides:
hasProxies
in class EcoreEList
isMany
protected boolean isMany()
hasInstanceClass
protected boolean hasInstanceClass()
isContainer
protected boolean isContainer()
isUnsettable
protected boolean isUnsettable()
isPrimitive
protected boolean isPrimitive()
isEnum
protected boolean isEnum()
get
public java.lang.Object get(boolean resolve)
- Description copied from interface:
EStructuralFeature.Setting
- Returns the value held by the feature of the object;
it optionally
resolves
the value.
- Overrides:
get
in class EcoreEList
- Following copied from interface:
org.eclipse.emf.ecore.EStructuralFeature.Setting
- Parameters:
resolve
- whether to resolve.- Returns:
- the value held by the feature of the object.
- See Also:
EObject.eGet(EStructuralFeature, boolean)
set
public void set(java.lang.Object newValue)
- Description copied from interface:
EStructuralFeature.Setting
- Set the value held by the feature of the object.
- Overrides:
set
in class EcoreEList
- Following copied from interface:
org.eclipse.emf.ecore.EStructuralFeature.Setting
- Parameters:
newValue
- the newValue.- See Also:
EObject.eSet(EStructuralFeature, Object)
isSet
public boolean isSet()
- Description copied from interface:
EStructuralFeature.Setting
- Returns whether a value is held by the feature of the object.
- Overrides:
isSet
in class EcoreEList
- Following copied from interface:
org.eclipse.emf.ecore.EStructuralFeature.Setting
- Returns:
- whether a value is held by the feature of the object.
- See Also:
EObject.eIsSet(EStructuralFeature)
unset
public void unset()
- Description copied from interface:
EStructuralFeature.Setting
- Unsets the value held by the feature of the object.
- Overrides:
unset
in class EcoreEList
- Following copied from interface:
org.eclipse.emf.ecore.EStructuralFeature.Setting
- See Also:
EObject.eUnset(EStructuralFeature)
createNotification
protected Notification createNotification(int eventType,
java.lang.Object oldObject,
java.lang.Object newObject,
int index)
- Description copied from class:
NotifyingListImpl
- Creates a notification.
- Overrides:
createNotification
in class EcoreEList
- 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.
basicAdd
public NotificationChain basicAdd(java.lang.Object object,
NotificationChain notifications)
- Description copied from interface:
InternalEList
- Add the object without updating the inverse.
- Overrides:
basicAdd
in class NotifyingListImpl
- Following copied from interface:
org.eclipse.emf.ecore.EStructuralFeature.Setting.Internal
- Returns:
- accumulated notifications.
- See Also:
InternalEList.basicAdd(Object, NotificationChain)
basicRemove
public NotificationChain basicRemove(java.lang.Object object,
NotificationChain notifications)
- Description copied from interface:
InternalEList
- Remove the object with without updating the inverse.
- Overrides:
basicRemove
in class NotifyingListImpl
- Following copied from interface:
org.eclipse.emf.ecore.EStructuralFeature.Setting.Internal
- Returns:
- accumulated notifications.
- See Also:
InternalEList.basicRemove(Object, NotificationChain)
canContainNull
protected boolean canContainNull()
- Description copied from class:
NotifyingListImpl
- Returns
!NotifyingListImpl.hasInverse()
.
- Overrides:
canContainNull
in class NotifyingListImpl
- Following copied from class:
org.eclipse.emf.common.notify.impl.NotifyingListImpl
- Returns:
!hasInverse
.
inverseAdd
public NotificationChain inverseAdd(java.lang.Object object,
NotificationChain notifications)
- Description copied from class:
NotifyingListImpl
- Does nothing and returns the
notifications
.
Clients can override this to update the inverse of a bidirectional relation.
- Overrides:
inverseAdd
in class EcoreEList
- 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
public NotificationChain inverseRemove(java.lang.Object object,
NotificationChain notifications)
- Description copied from class:
NotifyingListImpl
- Does nothing and returns the
notifications
.
Clients can override this to update the inverse of a bidirectional relation.
- Overrides:
inverseRemove
in class EcoreEList
- 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
.
resolveProxy
protected EObject resolveProxy(EObject eObject)
- Overrides:
resolveProxy
in class EcoreEList