Class EContainerIterator

  • All Implemented Interfaces:
    Iterator<org.eclipse.emf.ecore.EObject>

    public class EContainerIterator
    extends Object
    implements Iterator<org.eclipse.emf.ecore.EObject>
    Iterates over ancestors of an EObject starting from the parent. Parent-child relation is defined by EObject.eContainer().
    • Constructor Detail

      • EContainerIterator

        public EContainerIterator​(org.eclipse.emf.ecore.EObject from)
        Constructor. The first call to next() returns the parent of the 'from'
        Parameters:
        from - - base emf object.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<org.eclipse.emf.ecore.EObject>
      • next

        public org.eclipse.emf.ecore.EObject next()
        Specified by:
        next in interface Iterator<org.eclipse.emf.ecore.EObject>
      • remove

        public void remove()
        Guaranteed to throw an exception and leave the underlying data unmodified.
        Specified by:
        remove in interface Iterator<org.eclipse.emf.ecore.EObject>
        Throws:
        UnsupportedOperationException - always