Package ptolemy.kernel
Class Entity.ContainedObjectsIterator
- java.lang.Object
- 
- ptolemy.kernel.util.NamedObj.ContainedObjectsIterator
- 
- ptolemy.kernel.Entity.ContainedObjectsIterator
 
 
- 
- All Implemented Interfaces:
- java.util.Iterator
 - Direct Known Subclasses:
- CompositeEntity.ContainedObjectsIterator,- LazyTypedCompositeActor.ContainedObjectsIterator
 
 protected class Entity.ContainedObjectsIterator extends NamedObj.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. In derived classes, they include relations, and entities as well. The user of this class should have read access on the workspace and hold it for the duration of the use of the iterator. Moreover, it should not modify the port or attribute list while using the iterator or it will get a ConcurrentModificationException.
- 
- 
Constructor SummaryConstructors Constructor Description ContainedObjectsIterator()Create an iterator over all the contained objects, which for Entities are attributes and then ports.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Return true if the iteration has more elements.java.lang.Objectnext()Return the next element in the iteration.voidremove()The remove() method is not supported because is is not supported in NamedObj.ContainedObjectsIterator.remove().
 
- 
- 
- 
Method Detail- 
hasNextpublic boolean hasNext() Return true if the iteration has more elements. In this base class, this returns true if there are more attributes or ports.- Specified by:
- hasNextin interface- java.util.Iterator
- Overrides:
- hasNextin class- NamedObj.ContainedObjectsIterator
- Returns:
- True if there are more attributes or ports.
 
 - 
nextpublic java.lang.Object next() Return the next element in the iteration. In this base class, this is the next attribute or port.- Specified by:
- nextin interface- java.util.Iterator
- Overrides:
- nextin class- NamedObj.ContainedObjectsIterator
- Returns:
- The next attribute or port.
 
 - 
removepublic void remove() The remove() method is not supported because is is not supported in NamedObj.ContainedObjectsIterator.remove().- Specified by:
- removein interface- java.util.Iterator
- Overrides:
- removein class- NamedObj.ContainedObjectsIterator
 
 
- 
 
-