Class ContainableModelElementList

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private IModelElement parent  
      private static long serialVersionUID
      Identification for serialization.
      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ContainableModelElement getElement​(int index)
      Returns a contained model element specified by index.
      ContainableModelElement getElement​(java.lang.String name)
      Returns a contained model element specified by its name.
      int getElementCount()
      Returns the number of contained elements.
      ProjectImport getImport​(int index)
      Returns the project import specified by index.
      int getImportsCount()
      Returns the number of imports.
      java.lang.String getName()
      Returns the (unqualified) name of the scope.
      IModelElement getParent()
      Returns the parent model element.
      boolean hasInterfaces()
      Returns whether this project has interfaces.
      boolean isInterface()
      Returns whether this scope is an interfaces.
      • Methods inherited from class java.util.ArrayList

        add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Constructor Detail

      • ContainableModelElementList

        public ContainableModelElementList​(IModelElement parent)
        Creates a new model element list.
        Parameters:
        parent - the parent (scope, may be null)
      • ContainableModelElementList

        public ContainableModelElementList​(int initialCapacity,
                                           IModelElement parent)
        Creates a new model element list.
        Parameters:
        initialCapacity - the initial capacity of the list
        parent - the parent (scope, may be null)
    • Method Detail

      • getElement

        public ContainableModelElement getElement​(int index)
        Description copied from interface: IResolutionScope
        Returns a contained model element specified by index.
        Specified by:
        getElement in interface IResolutionScope
        Parameters:
        index - a 0-based index specifying the operation to be returned
        Returns:
        the contained element
      • getElementCount

        public int getElementCount()
        Description copied from interface: IResolutionScope
        Returns the number of contained elements.
        Specified by:
        getElementCount in interface IResolutionScope
        Returns:
        the number of contained elements
      • getImport

        public ProjectImport getImport​(int index)
        Description copied from interface: IResolutionScope
        Returns the project import specified by index.
        Specified by:
        getImport in interface IResolutionScope
        Parameters:
        index - a 0-based index specifying the import to be returned
        Returns:
        the project import
      • getName

        public java.lang.String getName()
        Returns the (unqualified) name of the scope.
        Specified by:
        getName in interface IResolutionScope
        Returns:
        the unqualified name of the scope
      • hasInterfaces

        public boolean hasInterfaces()
        Returns whether this project has interfaces.
        Specified by:
        hasInterfaces in interface IResolutionScope
        Returns:
        true if it has interfaces, false else
      • isInterface

        public boolean isInterface()
        Description copied from interface: IResolutionScope
        Returns whether this scope is an interfaces.
        Specified by:
        isInterface in interface IResolutionScope
        Returns:
        true if it is an interface, false else
      • getElement

        public ContainableModelElement getElement​(java.lang.String name)
        Description copied from interface: IResolutionScope
        Returns a contained model element specified by its name.
        Specified by:
        getElement in interface IResolutionScope
        Parameters:
        name - the qualified or unqualified name to search for
        Returns:
        the related element or null if no such element is known