Package xal.model
Class CompositeGlobalIterator
java.lang.Object
xal.model.CompositeGlobalIterator
- All Implemented Interfaces:
Iterator<IComponent>
Implementation of an iterator class for
IComposite
objects.
Returns each interface in the sequence, leaf or branch. Consequently the
returned interface should be typed to IComponent
.
The iteration order for child composite elements is parent first then all its
children.- Author:
- Christopher K. Allen, Ikeda
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeGlobalIterator
(IComposite composite) Create a newCompositeGlobalIterator
object connected to the specificIComposite
interface. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
CompositeGlobalIterator
Create a newCompositeGlobalIterator
object connected to the specificIComposite
interface.- Parameters:
composite
- interface to composite element to iterate
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<IComponent>
-
next
- Specified by:
next
in interfaceIterator<IComponent>
- Throws:
NoSuchElementException
-
remove
public void remove()- Specified by:
remove
in interfaceIterator<IComponent>
-