|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
An object that implements the FigureEnumeration interface generates a
series of Figures, one at a time. Successive calls to the
nextFigure method return successive Figures of the
series. This is just like a standard Enumeration, except we know we are dealing
with Figures and therefore users don't have to do any casting.
For example, to print all Figures of a vector v:
for (FigureEnumeration e = MyFigureEnumerator(v); e.hasMoreElements() ;) {
System.out.println(e.nextElement());
}
Enumeration| Method Summary | |
boolean |
hasMoreElements()
Tests if this enumeration contains more figures. |
Figure |
nextElement()
Returns the next Figure of this enumeration. |
| Method Detail |
public boolean hasMoreElements()
true if this enumeration contains more figures;
false otherwise.public Figure nextElement()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||