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
eStructuralFeatureFields 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, kindFields inherited from class org.eclipse.emf.ecore.util.DelegatingEcoreEList
ownerFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionModelEStoreEList(org.eclipse.emf.ecore.InternalEObject owner, org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature) Creates and initializes a newModelEStoreEListinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the object at the given index in the list.booleanaddAllUnique(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.voidAdds the object at the given index in the list; it does no ranging checking or uniqueness checking.voidAdds the object at the end of the list; it does no uniqueness checking.protected final voidThe method will be invoked after specified property.org.eclipse.emf.common.notify.NotificationChainbasicRemove(Object object, org.eclipse.emf.common.notify.NotificationChain notifications) protected final voidThe method will be invoked before specified property change.protected voidfirePropertyChange(String propertyName, Object oldValue, Object newValue, int index) Implementation must fire property change event.protected voidfirePropertyChange(String propertyName, Object oldValue, Object newValue, int index, int newIndex) Implementation must fire property change event.protected StringgetPropertyEventName(Object value) Returns name of the property change event.protected booleanintintlastIndexOf(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.booleanremoveAll(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 EValidates a new content object and returns the validated object.Methods inherited from class com.nomagic.magicdraw.emf.impl.BasicEStoreEList
createOperationTimeoutException, getLockProviderMethods 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, snapshotMethods inherited from class org.eclipse.emf.ecore.util.DelegatingEcoreEList.Generic
canContainNull, didChange, hasInstanceClass, hasInverse, hasManyInverse, hasNavigableInverse, isContainer, isContainment, isEObject, isSet, isUnique, isUnsettable, kind, unset, useEqualsMethods 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, toArrayMethods inherited from class org.eclipse.emf.ecore.util.DelegatingNotifyingInternalEListImpl
basicContains, basicContainsAll, basicGet, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicToArray, basicToArrayMethods 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, shadowSetMethods inherited from class org.eclipse.emf.common.util.DelegatingEList
doClear, equals, get, hashCode, isEmpty, primitiveGet, remove, retainAll, size, toStringMethods inherited from class org.eclipse.emf.common.util.AbstractEList
add, addAll, addAll, didAdd, didClear, didMove, didRemove, didSet, equalObjects, getDuplicates, getNonDuplicates, iterator, listIterator, listIterator, move, setMethods inherited from class java.util.AbstractList
removeRange, subListMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.eclipse.emf.common.util.EList
moveMethods inherited from interface org.eclipse.emf.ecore.util.InternalEList
addAllUnique, basicAdd, basicContains, basicContainsAll, basicGet, basicIndexOf, basicIterator, basicLastIndexOf, basicList, basicListIterator, basicListIterator, basicToArray, basicToArrayMethods 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 newModelEStoreEListinstance.- 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:
getPropertyEventNamein 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:
beforeChangein classBasicEStoreEList<E>
-
afterChange
protected final void afterChange()Description copied from class:com.dassault_systemes.modeler.foundation.emf.impl.AbstractEStoreEListThe method will be invoked after specified property.- Overrides:
afterChangein classBasicEStoreEList<E>
-
firePropertyChange
Implementation must fire property change event.- Overrides:
firePropertyChangein 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. Ifuniquenessis required, duplicates will be ignored. This implementation delegates toaddUnique(int, E)after uniqueness checking.- Specified by:
addin interfaceList<E>- Overrides:
addin classorg.eclipse.emf.common.util.AbstractEList<E>- Parameters:
object- the object to be added.- Throws:
IllegalArgumentException- ifuniquenessis 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, ifnecessaryand returns the argument object. Clients may throw additional types of runtime exceptions in order to handle constraint violations.- Overrides:
validatein 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 asrequiredand delegates toinverseAddasrequired.- Specified by:
addUniquein interfaceorg.eclipse.emf.ecore.util.InternalEList<E>- Overrides:
addUniquein 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 asrequiredand delegates toinverseAddasrequired.- Specified by:
addUniquein interfaceorg.eclipse.emf.ecore.util.InternalEList<E>- Overrides:
addUniquein 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 asrequiredand delegates toinverseAddandinverseRemoveasrequired.- Specified by:
setUniquein interfaceorg.eclipse.emf.ecore.util.InternalEList<E>- Overrides:
setUniquein 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:
movein interfaceorg.eclipse.emf.common.util.EList<E>- Overrides:
movein 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 asrequiredand delegates toinverseAddasrequired.- Specified by:
addAllUniquein interfaceorg.eclipse.emf.ecore.util.InternalEList<E>- Overrides:
addAllUniquein 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 asrequiredand delegates toinverseRemoveasrequired.- Specified by:
removein interfaceList<E>- Overrides:
removein 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 asrequiredand delegates toinverseRemoveasrequired.- Specified by:
removeAllin interfaceCollection<E>- Specified by:
removeAllin interfaceList<E>- Overrides:
removeAllin 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:
lastIndexOfin interfaceList<E>- Overrides:
lastIndexOfin classorg.eclipse.emf.ecore.util.DelegatingEcoreEList<E>
-
hasProxies
protected boolean hasProxies()- Overrides:
hasProxiesin 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)
-