ptolemy.actor
Class LazyTypedCompositeActor.ContainedObjectsIterator

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj.ContainedObjectsIterator
      extended by ptolemy.kernel.Entity.ContainedObjectsIterator
          extended by ptolemy.actor.LazyTypedCompositeActor.ContainedObjectsIterator
All Implemented Interfaces:
java.util.Iterator
Enclosing class:
LazyTypedCompositeActor

protected class LazyTypedCompositeActor.ContainedObjectsIterator
extends Entity.ContainedObjectsIterator

This class is an iterator over all the contained objects (all instances of NamedObj) except those that have not yet been instantiated because of laziness. In this class, the contained objects are attributes first, then ports, then entities, then relations.


Field Summary
private  java.util.Iterator _classListIterator
           
private  java.util.Iterator _entityListIterator
           
private  java.util.Iterator _relationListIterator
           
 
Constructor Summary
LazyTypedCompositeActor.ContainedObjectsIterator()
          Create an iterator over all the contained objects, which for CompositeEntities are attributes, ports, classes entities, and relations.
 
Method Summary
 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().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_classListIterator

private java.util.Iterator _classListIterator

_entityListIterator

private java.util.Iterator _entityListIterator

_relationListIterator

private java.util.Iterator _relationListIterator
Constructor Detail

LazyTypedCompositeActor.ContainedObjectsIterator

public LazyTypedCompositeActor.ContainedObjectsIterator()
Create an iterator over all the contained objects, which for CompositeEntities are attributes, ports, classes entities, and relations.

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 interface java.util.Iterator
Overrides:
hasNext in class Entity.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 interface java.util.Iterator
Overrides:
next in class Entity.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 interface java.util.Iterator
Overrides:
remove in class Entity.ContainedObjectsIterator