01: package de.java2html.util;
02:
03: import java.util.Enumeration;
04: import java.util.Iterator;
05:
06: /**
07: * @author Markus Gebhard
08: */
09: public class IteratorEnumeration implements Enumeration {
10: private Iterator iterator;
11:
12: public IteratorEnumeration(Iterator iterator) {
13: this .iterator = iterator;
14: }
15:
16: public boolean hasMoreElements() {
17: return iterator.hasNext();
18: }
19:
20: public Object nextElement() {
21: return iterator.next();
22: }
23: }
|