JHotDraw 6.0b1

org.jhotdraw.framework
Interface FigureEnumeration

All Known Implementing Classes:
FigureAndEnumerator, FigureEnumerator, ReverseFigureEnumerator, SingleFigureEnumerator

public interface FigureEnumeration

Interface for Enumerations that access Figures. It provides a method nextFigure, that hides the down casting from client code.


Method Summary
 boolean hasNextFigure()
           
 Figure nextFigure()
          Returns the next element of the enumeration.
 void reset()
          Reset the enumeration so it can be reused again.
 

Method Detail

nextFigure

Figure nextFigure()
Returns the next element of the enumeration. Calls to this method will enumerate successive elements.

Throws:
java.util.NoSuchElementException - If no more elements exist.

hasNextFigure

boolean hasNextFigure()

reset

void reset()
Reset the enumeration so it can be reused again. However, the underlying collection might have changed since the last usage so the elements and the order may vary when using an enumeration which has been reset.


JHotDraw 6.0b1