ptolemy.kernel
Class CompositeEntity.ContainedObjectsIterator

java.lang.Object
  extended byptolemy.kernel.util.NamedObj.ContainedObjectsIterator
      extended byptolemy.kernel.Entity.ContainedObjectsIterator
          extended byptolemy.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
protected CompositeEntity.ContainedObjectsIterator()
           
 
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()
          Remove from the underlying collection the last element returned by the iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeEntity.ContainedObjectsIterator

protected CompositeEntity.ContainedObjectsIterator()
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, 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()
Remove from the underlying collection the last element returned by the iterator.

Specified by:
remove in interface java.util.Iterator
Overrides:
remove in class Entity.ContainedObjectsIterator