01: package com.sun.portal.ffj.util;
02:
03: import java.util.Enumeration;
04: import java.util.Iterator;
05:
06: public class EnumerationIterator implements Iterator {
07:
08: public EnumerationIterator(Enumeration en) {
09: m_En = en;
10: }
11:
12: public boolean hasNext() {
13: return m_En.hasMoreElements();
14: }
15:
16: public Object next() {
17: return m_En.nextElement();
18: }
19:
20: public void remove() throws UnsupportedOperationException {
21: throw new UnsupportedOperationException(
22: "Remove not allowed in EnumerationIterator.");
23: }
24:
25: private Enumeration m_En;
26: }
|