Class RedefiningEObjectEList<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
org.eclipse.emf.ecore.util.AbstractSequentialInternalEList<E>
org.eclipse.uml2.common.util.DerivedEObjectEList<E>
org.eclipse.uml2.common.util.DerivedSubsetEObjectEList<E>
com.nomagic.magicdraw.uml2.util.RedefiningEObjectEList<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<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>

public class RedefiningEObjectEList<E> extends org.eclipse.uml2.common.util.DerivedSubsetEObjectEList<E>
  • Constructor Details

    • RedefiningEObjectEList

      public RedefiningEObjectEList(Class<?> dataClass, org.eclipse.emf.ecore.InternalEObject owner, int featureID, int sourceFeatureID)
  • Method Details

    • move

      public E move(int newPosition, int oldPosition)
      Moves the object from the old position to the new position.
      Specified by:
      move in interface org.eclipse.emf.common.util.EList<E>
      Overrides:
      move in class org.eclipse.emf.ecore.util.AbstractSequentialInternalEList<E>
      Parameters:
      newPosition - the position of the object after the move.
      oldPosition - the position of the object before the move.
      Returns:
      the moved object.
    • add

      public boolean add(E e)
      Appends the specified element to the start of this list (optional operation).

      Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

      This implementation calls add(0, e).

      Note that this implementation throws an UnsupportedOperationException unless add(int, E) is overridden.

      Specified by:
      add in interface Collection<E>
      Specified by:
      add in interface List<E>
      Overrides:
      add in class AbstractList<E>
      Parameters:
      e - element to be appended to this list
      Returns:
      true (as specified by Collection.add(E))
      Throws:
      UnsupportedOperationException - if the add operation is not supported by this list
      ClassCastException - if the class of the specified element prevents it from being added to this list
      NullPointerException - if the specified element is null and this list does not permit null elements
      IllegalArgumentException - if some property of this element prevents it from being added to this list
    • move

      public void move(int newPosition, E object)
      Moves the object to the new position, if is in the list.
      Specified by:
      move in interface org.eclipse.emf.common.util.EList<E>
      Overrides:
      move in class org.eclipse.emf.ecore.util.AbstractSequentialInternalEList<E>
      Parameters:
      newPosition - the position of the object after the move.
      object - the object to move.
    • addAll

      public boolean addAll(Collection<? extends E> collection)
      Specified by:
      addAll in interface Collection<E>
      Specified by:
      addAll in interface List<E>
      Overrides:
      addAll in class AbstractCollection<E>
    • addAll

      public boolean addAll(int index, Collection<? extends E> collection)
      Specified by:
      addAll in interface List<E>
      Overrides:
      addAll in class org.eclipse.uml2.common.util.DerivedEObjectEList<E>
    • hasNavigableInverse

      protected boolean hasNavigableInverse()
    • hasInstanceClass

      protected boolean hasInstanceClass()
    • getFeatureType

      protected org.eclipse.emf.ecore.EClassifier getFeatureType()
    • getInverseEReference

      protected org.eclipse.emf.ecore.EReference getInverseEReference()
    • getInverseFeatureID

      protected int getInverseFeatureID()
    • getInverseFeatureClass

      protected Class<?> getInverseFeatureClass()
    • getFeatureID

      public int getFeatureID()
    • inverseAdd

      public org.eclipse.emf.common.notify.NotificationChain inverseAdd(Object object, org.eclipse.emf.common.notify.NotificationChain notifications)
    • inverseRemove

      public org.eclipse.emf.common.notify.NotificationChain inverseRemove(Object object, org.eclipse.emf.common.notify.NotificationChain notifications)
    • addUniqueSuppressNotifications

      public void addUniqueSuppressNotifications(E object)
    • isNotificationRequired

      protected boolean isNotificationRequired()
      Overrides:
      isNotificationRequired in class org.eclipse.uml2.common.util.DerivedSubsetEObjectEList<E>
    • isContainment

      protected boolean isContainment()
    • newListIterator

      protected ListIterator<E> newListIterator()
      Overrides:
      newListIterator in class org.eclipse.uml2.common.util.DerivedSubsetEObjectEList<E>
    • newResolvingListIterator

      protected ListIterator<E> newResolvingListIterator()
      Overrides:
      newResolvingListIterator in class org.eclipse.uml2.common.util.DerivedSubsetEObjectEList<E>
    • basicList

      public List<E> basicList()
      Specified by:
      basicList in interface org.eclipse.emf.ecore.util.InternalEList<E>
      Overrides:
      basicList in class org.eclipse.uml2.common.util.DerivedSubsetEObjectEList<E>
    • listIterator

      protected ListIterator<E> listIterator(int index, boolean resolve)
      Overrides:
      listIterator in class org.eclipse.uml2.common.util.DerivedEObjectEList<E>