1 /*
2  * @(#)FigureEnumeration.java 5.1
3  *
4  */
5 
6 package CH.ifa.draw.framework;
7 
8 import java.util.*;
9 
10 /**
11  * Interface for Enumerations that access Figures.
12  * It provides a method nextFigure, that hides the down casting
13  * from client code.
14  */
15 public interface FigureEnumeration extends Enumeration {
16     /**
17      * Returns the next element of the enumeration. Calls to this
18      * method will enumerate successive elements.
19      * @exception NoSuchElementException If no more elements exist.
20      */
nextFigure()21     public Figure nextFigure();
22 
23     /**
24      * Returns true if thje enumeration contains the specified figure
25      * @param   figure      the figure to check
26      */
contains(Figure figure)27     public boolean contains(Figure figure);
28 }
29