Package ptolemy.kernel
Class CompositeEntity.ContainedObjectsIterator
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj.ContainedObjectsIterator
-
- ptolemy.kernel.Entity.ContainedObjectsIterator
-
- ptolemy.kernel.CompositeEntity.ContainedObjectsIterator
-
- All Implemented Interfaces:
java.util.Iterator
- Enclosing class:
- CompositeEntity
protected class CompositeEntity.ContainedObjectsIterator extends Entity.ContainedObjectsIterator
This class is an iterator over all the contained objects (all instances of NamedObj). In this class, the contained objects are attributes first, then ports, then entities, then relations.
-
-
Constructor Summary
Constructors Constructor Description ContainedObjectsIterator()
Create an iterator over all the contained objects, which for CompositeEntities are attributes, ports, classes entities, and relations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Return true if the iteration has more elements.java.lang.Object
next()
Return the next element in the iteration.void
remove()
The remove() method is not supported because is is not supported in NamedObj.ContainedObjectsIterator.remove().
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Return true if the iteration has more elements. In this class, this returns true if there are more attributes, ports, classes, entities, or relations.- Specified by:
hasNext
in interfacejava.util.Iterator
- Overrides:
hasNext
in classEntity.ContainedObjectsIterator
- Returns:
- True if there are more elements.
-
next
public java.lang.Object next()
Return the next element in the iteration. In this base class, this is the next attribute or port.- Specified by:
next
in interfacejava.util.Iterator
- Overrides:
next
in classEntity.ContainedObjectsIterator
- Returns:
- The next attribute or port.
-
remove
public void remove()
The remove() method is not supported because is is not supported in NamedObj.ContainedObjectsIterator.remove().- Specified by:
remove
in interfacejava.util.Iterator
- Overrides:
remove
in classEntity.ContainedObjectsIterator
-
-