ptolemy.kernel.util
Class NamedObj.ContainedObjectsIterator

java.lang.Object
  extended byptolemy.kernel.util.NamedObj.ContainedObjectsIterator
All Implemented Interfaces:
java.util.Iterator
Direct Known Subclasses:
Entity.ContainedObjectsIterator
Enclosing class:
NamedObj

protected class NamedObj.ContainedObjectsIterator
extends java.lang.Object
implements java.util.Iterator

This class is an iterator over all the contained objects (all instances of NamedObj). In this base class, the contained objects are attributes. In derived classes, they include ports, relations, and entities as well.


Constructor Summary
protected NamedObj.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

NamedObj.ContainedObjectsIterator

protected NamedObj.ContainedObjectsIterator()
Method Detail

hasNext

public boolean hasNext()
Return true if the iteration has more elements. In this base class, this returns true if there are more attributes.

Specified by:
hasNext in interface java.util.Iterator
Returns:
True if there are more attributes.

next

public java.lang.Object next()
Return the next element in the iteration. In this base class, this is the next attribute.

Specified by:
next in interface java.util.Iterator
Returns:
The next attribute.

remove

public void remove()
Remove from the underlying collection the last element returned by the iterator.

Specified by:
remove in interface java.util.Iterator