Package com.nomagic.magicdraw.uml2.util
Class ModelEStoreEList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.eclipse.emf.common.util.AbstractEList<E>
org.eclipse.emf.common.util.DelegatingEList<E>
org.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl<E>
org.eclipse.emf.ecore.util.DelegatingNotifyingInternalEListImpl<E>
org.eclipse.emf.ecore.util.DelegatingEcoreEList<E>
org.eclipse.emf.ecore.util.DelegatingEcoreEList.Generic<E>
org.eclipse.emf.ecore.util.DelegatingEcoreEList.Dynamic<E>
com.dassault_systemes.modeler.foundation.emf.impl.AbstractEStoreEList<E>
com.nomagic.magicdraw.emf.impl.BasicEStoreEList<E>
com.nomagic.magicdraw.uml2.util.ModelEStoreEList<E>
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,List<E>
,org.eclipse.emf.common.notify.NotifyingList<E>
,org.eclipse.emf.common.util.EList<E>
,org.eclipse.emf.ecore.EStructuralFeature.Setting
,org.eclipse.emf.ecore.util.InternalEList<E>
,org.eclipse.emf.ecore.util.InternalEList.Unsettable<E>
- Direct Known Subclasses:
NoNullModelEStoreEList
,SubsetSupersetEObjectEStoreEList
A list that delegates to a store.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.emf.ecore.util.DelegatingEcoreEList.Dynamic
eStructuralFeature
Fields inherited from class org.eclipse.emf.ecore.util.DelegatingEcoreEList.Generic
HAS_INSTANCE_CLASS, HAS_MANY_INVERSE, HAS_NAVIGABLE_INVERSE, HAS_PROXIES, IS_CONTAINER, IS_CONTAINMENT, IS_ENUM, IS_EOBJECT, IS_PRIMITIVE, IS_SET, IS_UNIQUE, IS_UNSETTABLE, kind
Fields inherited from class org.eclipse.emf.ecore.util.DelegatingEcoreEList
owner
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionModelEStoreEList
(org.eclipse.emf.ecore.InternalEObject owner, org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature) Creates and initializes a newModelEStoreEList
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the object at the given index in the list.boolean
addAllUnique
(int index, Collection<? extends E> 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
Adds the object at the given index in the list; it does no ranging checking or uniqueness checking.void
Adds the object at the end of the list; it does no uniqueness checking.protected final void
The method will be invoked after specified property.org.eclipse.emf.common.notify.NotificationChain
basicRemove
(Object object, org.eclipse.emf.common.notify.NotificationChain notifications) protected final void
The method will be invoked before specified property change.protected void
firePropertyChange
(String propertyName, Object oldValue, Object newValue, int index) Implementation must fire property change event.protected void
firePropertyChange
(String propertyName, Object oldValue, Object newValue, int index, int newIndex) Implementation must fire property change event.protected String
getPropertyEventName
(Object value) Returns name of the property change event.protected boolean
int
int
lastIndexOf
(Object 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.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.Sets the object at the index and returns the old object at the index; it does no ranging checking or uniqueness checking.protected E
Validates a new content object and returns the validated object.Methods inherited from class com.nomagic.magicdraw.emf.impl.BasicEStoreEList
createOperationTimeoutException, getLockProvider
Methods inherited from class com.dassault_systemes.modeler.foundation.emf.impl.AbstractEStoreEList
delegateAdd, delegateAdd, delegateBasicList, delegateClear, delegateContains, delegateContainsAll, delegateEquals, delegateGet, delegateHashCode, delegateIndexOf, delegateIsEmpty, delegateIterator, delegateLastIndexOf, delegateList, delegateListIterator, delegateMove, delegateRemove, delegateSet, delegateSize, delegateToArray, delegateToArray, delegateToString, eStore, execute, getEStructuralFeature, makeLastInCollection, snapshot
Methods inherited from class org.eclipse.emf.ecore.util.DelegatingEcoreEList.Generic
canContainNull, didChange, hasInstanceClass, hasInverse, hasManyInverse, hasNavigableInverse, isContainer, isContainment, isEObject, isSet, isUnique, isUnsettable, kind, unset, useEquals
Methods inherited from class org.eclipse.emf.ecore.util.DelegatingEcoreEList
contains, containsAll, createNotification, createNotification, dispatchNotification, get, getEObject, getFeature, getFeatureID, getFeatureType, getInverseEReference, getInverseFeatureClass, getInverseFeatureID, getNotifier, inverseAdd, inverseRemove, isInstance, isNotificationRequired, resolve, resolve, resolveProxy, set, toArray, toArray
Methods inherited from class org.eclipse.emf.ecore.util.DelegatingNotifyingInternalEListImpl
basicContains, basicContainsAll, basicGet, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicToArray, basicToArray
Methods inherited from class org.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl
addAllUnique, addAllUnique, addAllUnique, basicAdd, basicSet, clear, createNotification, createNotificationChain, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddAllUnique, doAddUnique, doAddUnique, doClear, doMove, doRemove, doRemoveAll, doSetUnique, getFeatureID, hasShadow, shadowAdd, shadowRemove, shadowSet
Methods inherited from class org.eclipse.emf.common.util.DelegatingEList
doClear, equals, get, hashCode, isEmpty, primitiveGet, remove, retainAll, size, toString
Methods inherited from class org.eclipse.emf.common.util.AbstractEList
add, addAll, addAll, didAdd, didClear, didMove, didRemove, didSet, equalObjects, getDuplicates, getNonDuplicates, iterator, listIterator, listIterator, move, set
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 java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface org.eclipse.emf.common.util.EList
move
Methods inherited from interface org.eclipse.emf.ecore.util.InternalEList
addAllUnique, basicAdd, basicContains, basicContainsAll, basicGet, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicToArray, basicToArray
Methods inherited from interface java.util.List
add, addAll, addAll, clear, equals, get, hashCode, isEmpty, iterator, listIterator, listIterator, remove, replaceAll, retainAll, set, size, sort, spliterator, subList
-
Constructor Details
-
ModelEStoreEList
public ModelEStoreEList(org.eclipse.emf.ecore.InternalEObject owner, org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature) Creates and initializes a newModelEStoreEList
instance.- Parameters:
owner
- owner of the collection.eStructuralFeature
- feature that values is hold by this collection.
-
-
Method Details
-
getPropertyEventName
Returns name of the property change event.- Overrides:
getPropertyEventName
in classcom.dassault_systemes.modeler.foundation.emf.impl.AbstractEStoreEList<E>
- Parameters:
value
- property that changed value.- Returns:
- property name.
-
beforeChange
protected final void beforeChange()The method will be invoked before specified property change.- Overrides:
beforeChange
in classBasicEStoreEList<E>
-
afterChange
protected final void afterChange()Description copied from class:com.dassault_systemes.modeler.foundation.emf.impl.AbstractEStoreEList
The method will be invoked after specified property.- Overrides:
afterChange
in classBasicEStoreEList<E>
-
firePropertyChange
Implementation must fire property change event.- Overrides:
firePropertyChange
in classBasicEStoreEList<E>
- Parameters:
propertyName
- name of the changed property.oldValue
- old value of the property.newValue
- new value of the property.index
- index of the new value.
-
firePropertyChange
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue, int index, int newIndex) Implementation must fire property change event.- Parameters:
propertyName
- name of the changed property.oldValue
- old value of the property.newValue
- new value of the property.index
- index of the new value.newIndex
- new index of the value
-
add
Adds the object at the given index in the list. Ifuniqueness
is required, duplicates will be ignored. This implementation delegates toaddUnique(int, E)
after uniqueness checking.- Specified by:
add
in interfaceList<E>
- Overrides:
add
in classorg.eclipse.emf.common.util.AbstractEList<E>
- Parameters:
object
- the object to be added.- Throws:
IllegalArgumentException
- ifuniqueness
is required, and the object is a duplicate.- See Also:
-
validate
Validates a new content object and returns the validated object. This implementation checks for null, ifnecessary
and returns the argument object. Clients may throw additional types of runtime exceptions in order to handle constraint violations.- Overrides:
validate
in classorg.eclipse.emf.ecore.util.DelegatingEcoreEList<E>
- Parameters:
index
- the position of the new content.object
- the new content.- Returns:
- the validated content.
- Throws:
IllegalArgumentException
- if a constraint prevents the object from being added.
-
addUnique
Adds the object at the end of the list; it does no uniqueness checking. In addition to the normal effects, this override implementation generates notifications asrequired
and delegates toinverseAdd
asrequired
.- Specified by:
addUnique
in interfaceorg.eclipse.emf.ecore.util.InternalEList<E>
- Overrides:
addUnique
in classorg.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl<E>
- Parameters:
object
- the object to be added.- See Also:
-
DelegatingEcoreEList.isNotificationRequired()
DelegatingEcoreEList.Generic.hasInverse()
DelegatingEcoreEList.inverseAdd(E, org.eclipse.emf.common.notify.NotificationChain)
-
addUnique
Adds the object at the given index in the list; it does no ranging checking or uniqueness checking. In addition to the normal effects, this override implementation generates notifications asrequired
and delegates toinverseAdd
asrequired
.- Specified by:
addUnique
in interfaceorg.eclipse.emf.ecore.util.InternalEList<E>
- Overrides:
addUnique
in classorg.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl<E>
- Parameters:
object
- the object to be added.- See Also:
-
DelegatingEcoreEList.isNotificationRequired()
DelegatingEcoreEList.Generic.hasInverse()
DelegatingEcoreEList.inverseAdd(E, org.eclipse.emf.common.notify.NotificationChain)
-
setUnique
Sets the object at the index and returns the old object at the index; it does no ranging checking or uniqueness checking. In addition to the normal effects, this override implementation generates notifications asrequired
and delegates toinverseAdd
andinverseRemove
asrequired
.- Specified by:
setUnique
in interfaceorg.eclipse.emf.ecore.util.InternalEList<E>
- Overrides:
setUnique
in classorg.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl<E>
- Parameters:
index
- the position in question.object
- the object to set.- Returns:
- the old object at the index.
- See Also:
-
DelegatingEcoreEList.isNotificationRequired()
DelegatingEcoreEList.Generic.hasInverse()
DelegatingEcoreEList.inverseAdd(E, org.eclipse.emf.common.notify.NotificationChain)
DelegatingEcoreEList.inverseRemove(E, org.eclipse.emf.common.notify.NotificationChain)
-
move
Moves the object at the source index of the list to the target index of the list and returns the moved object. In addition to the normal effects, this override implementation generates notifications asrequired
.- Specified by:
move
in interfaceorg.eclipse.emf.common.util.EList<E>
- Overrides:
move
in classorg.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl<E>
- Parameters:
targetIndex
- the new position for the object in the list.sourceIndex
- the old position of the object in the list.- Returns:
- the moved object.
- Throws:
IndexOutOfBoundsException
- if either index isn't within the size range.- See Also:
-
DelegatingEcoreEList.isNotificationRequired()
-
addAllUnique
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. In addition to the normal effects, this override implementation generates notifications asrequired
and delegates toinverseAdd
asrequired
.- Specified by:
addAllUnique
in interfaceorg.eclipse.emf.ecore.util.InternalEList<E>
- Overrides:
addAllUnique
in classorg.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl<E>
- Parameters:
index
- the index at which to add.collection
- the collection of objects to be added.- Returns:
- whether any objects were added.
- See Also:
-
DelegatingEcoreEList.isNotificationRequired()
DelegatingEcoreEList.Generic.hasInverse()
DelegatingEcoreEList.inverseAdd(E, org.eclipse.emf.common.notify.NotificationChain)
-
remove
Removes the object at the index from the list and returns it. In addition to the normal effects, this override implementation generates notifications asrequired
and delegates toinverseRemove
asrequired
.- Specified by:
remove
in interfaceList<E>
- Overrides:
remove
in classorg.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl<E>
- Parameters:
index
- the position of the object to remove.- Returns:
- the removed object.
- Throws:
IndexOutOfBoundsException
- if the index isn't within the size range.- See Also:
-
DelegatingEcoreEList.isNotificationRequired()
DelegatingEcoreEList.Generic.hasInverse()
DelegatingEcoreEList.inverseRemove(E, org.eclipse.emf.common.notify.NotificationChain)
-
removeAll
Removes each object of the collection from the list and returns whether any object was actually contained by the list. In addition to the normal effects, this override implementation generates notifications asrequired
and delegates toinverseRemove
asrequired
.- Specified by:
removeAll
in interfaceCollection<E>
- Specified by:
removeAll
in interfaceList<E>
- Overrides:
removeAll
in classorg.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl<E>
- Parameters:
collection
- the collection of objects to be removed.- Returns:
- whether any object was actually contained by the list.
- See Also:
-
DelegatingEcoreEList.isNotificationRequired()
DelegatingEcoreEList.Generic.hasInverse()
DelegatingEcoreEList.inverseRemove(E, org.eclipse.emf.common.notify.NotificationChain)
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<E>
- Overrides:
lastIndexOf
in classorg.eclipse.emf.ecore.util.DelegatingEcoreEList<E>
-
hasProxies
protected boolean hasProxies()- Overrides:
hasProxies
in classorg.eclipse.emf.ecore.util.DelegatingEcoreEList.Generic<E>
-
basicRemove
public org.eclipse.emf.common.notify.NotificationChain basicRemove(Object object, org.eclipse.emf.common.notify.NotificationChain notifications)
-