fi.utu.cs.appearance
Class ShapeIterator

java.lang.Object
  |
  +--fi.utu.cs.appearance.ShapeIterator

public class ShapeIterator
extends java.lang.Object

An iterator over an array of shapable objects. The objects are rendered in the order of the array (i.e., the first object is rendered first and the rest will be rendered over it).

Since:
1.1
See Also:
Shapable

Constructor Summary
ShapeIterator(Shapable[] s)
          Constructs an iterator for the shapable objects.
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
 Shapable next()
          Returns the next shapable object in the iteration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeIterator

public ShapeIterator(Shapable[] s)
Constructs an iterator for the shapable objects. The iterator will traverse the objects in the order given in the array s.

Method Detail

hasNext

public boolean hasNext()
Returns true if the iteration has more elements.


next

public Shapable next()
              throws java.util.NoSuchElementException
Returns the next shapable object in the iteration.

Throws:
java.util.NoSuchElementException - Iteration has no more elements.