Class ModifiableDerivedUnionEObjectEList<E>

  • All Implemented Interfaces:
    java.lang.Iterable<E>, java.util.Collection<E>, java.util.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 ModifiableDerivedUnionEObjectEList<E>
    extends org.eclipse.uml2.common.util.DerivedUnionEObjectEList<E>
    A derived list representing a union of all the elements from its source features. This list is ideal for implementing derived union features.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  ModifiableDerivedUnionEObjectEList.DerivedUnionIterator
      Non resolving DerivedUnionEObjectEStoreEList iterator.
      class  ModifiableDerivedUnionEObjectEList.DerivedUnionResolvingIterator
      Resolving DerivedUnionEObjectEStoreEList iterator.
      class  ModifiableDerivedUnionEObjectEList.EmptyDerivedUnionListIterator
      Empty DerivedUnionEObjectEStoreEList iterator.
      • Nested classes/interfaces inherited from class org.eclipse.uml2.common.util.DerivedEObjectEList

        org.eclipse.uml2.common.util.DerivedEObjectEList.DerivedListIterator, org.eclipse.uml2.common.util.DerivedEObjectEList.EmptyDerivedListIterator, org.eclipse.uml2.common.util.DerivedEObjectEList.ResolvingDerivedListIterator
      • Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.util.InternalEList

        org.eclipse.emf.ecore.util.InternalEList.Unsettable<E extends java.lang.Object>
    • Field Summary

      • Fields inherited from class org.eclipse.uml2.common.util.DerivedEObjectEList

        dataClass, featureID, owner, sourceFeatureIDs
      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      ModifiableDerivedUnionEObjectEList​(java.lang.Class<?> dataClass, org.eclipse.emf.ecore.InternalEObject owner, int featureID, int[] sourceFeatureIDs)
      Creates and initializes a new DerivedUnionEObjectEStoreEList from specified parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(E e)
      Appends the specified element to the end of this list (optional operation).
      boolean contains​(java.lang.Object object)
      The method is copied from supper and fixed casting to Collection instead of List.
      boolean isEmpty()  
      E move​(int newPosition, int oldPosition)
      Move is not supported however the method returns value at old index.
      void move​(int newPosition, E object)
      Does nothing.
      protected java.util.ListIterator<E> newEmptyListIterator()  
      protected java.util.ListIterator<E> newListIterator()  
      protected java.util.ListIterator<E> newResolvingListIterator()  
      boolean remove​(java.lang.Object obj)  
      java.util.List<E> snapshot()  
      • Methods inherited from class org.eclipse.uml2.common.util.DerivedUnionEObjectEList

        basicList, isIncluded
      • Methods inherited from class org.eclipse.uml2.common.util.DerivedEObjectEList

        add, addAll, addAllUnique, addUnique, basicListIterator, createNotification, derive, dispatchNotification, doAddAllUnique, get, getEObject, getEStructuralFeature, getEStructuralFeature, isIncluded, isNotificationRequired, isSet, listIterator, listIterator, remove, set, set, setUnique, size, unset, validate
      • Methods inherited from class org.eclipse.emf.ecore.util.AbstractSequentialInternalEList

        addAllUnique, addUnique, basicAdd, basicContains, basicContainsAll, basicGet, basicIndexOf, basicIterator, basicLastIndexOf, basicListIterator, basicRemove, basicToArray, basicToArray
      • Methods inherited from class java.util.AbstractSequentialList

        get, iterator
      • Methods inherited from class java.util.AbstractList

        clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
      • Methods inherited from class java.util.AbstractCollection

        addAll, containsAll, removeAll, retainAll, toArray, toArray, toString
      • 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.ecore.util.InternalEList

        addAllUnique, addUnique, basicAdd, basicContains, basicContainsAll, basicGet, basicIndexOf, basicIterator, basicLastIndexOf, basicListIterator, basicRemove, basicToArray, basicToArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        addAll, clear, containsAll, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArray
    • Constructor Detail

      • ModifiableDerivedUnionEObjectEList

        public ModifiableDerivedUnionEObjectEList​(java.lang.Class<?> dataClass,
                                                  org.eclipse.emf.ecore.InternalEObject owner,
                                                  int featureID,
                                                  int[] sourceFeatureIDs)
        Creates and initializes a new DerivedUnionEObjectEStoreEList from specified parameters.
        Parameters:
        dataClass - class of objects which will be stored in the collection.
        owner - owner of the collection.
        featureID - feature which value this list represents ID.
        sourceFeatureIDs - identifiers of features that compose values of this list.
    • Method Detail

      • add

        public boolean add​(E e)
        Appends the specified element to the end 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(size(), e).

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

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

        public E move​(int newPosition,
                      int oldPosition)
        Move is not supported however the method returns value at old index.
        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 - new position.
        oldPosition - old position.
        Returns:
        value at old position.
      • move

        public void move​(int newPosition,
                         E object)
        Does nothing. Move is not supported.
        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 - new position.
        object - an object to move.
      • remove

        public boolean remove​(java.lang.Object obj)
        Specified by:
        remove in interface java.util.Collection<E>
        Specified by:
        remove in interface java.util.List<E>
        Overrides:
        remove in class java.util.AbstractCollection<E>
      • contains

        public boolean contains​(java.lang.Object object)
        The method is copied from supper and fixed casting to Collection instead of List.
        Specified by:
        contains in interface java.util.Collection<E>
        Specified by:
        contains in interface java.util.List<E>
        Overrides:
        contains in class org.eclipse.uml2.common.util.DerivedEObjectEList<E>
        Parameters:
        object - an object.
        Returns:
        true if the collection contains the object, otherwise - false.
      • newListIterator

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

        protected java.util.ListIterator<E> newResolvingListIterator()
        Overrides:
        newResolvingListIterator in class org.eclipse.uml2.common.util.DerivedEObjectEList<E>
      • newEmptyListIterator

        protected java.util.ListIterator<E> newEmptyListIterator()
        Overrides:
        newEmptyListIterator in class org.eclipse.uml2.common.util.DerivedEObjectEList<E>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<E>
        Specified by:
        isEmpty in interface java.util.List<E>
        Overrides:
        isEmpty in class org.eclipse.uml2.common.util.DerivedEObjectEList<E>
      • snapshot

        public java.util.List<E> snapshot()