1 5 package com.opensymphony.webwork.views.jsp; 6 7 import java.util.Enumeration ; 8 import java.util.Iterator ; 9 10 11 15 public class EnumeratorIterator implements Iterator { 16 18 Enumeration e; 19 20 22 public EnumeratorIterator(Enumeration e) { 23 this.e = e; 24 } 25 26 28 public boolean hasNext() { 29 return e.hasMoreElements(); 30 } 31 32 public Object next() { 33 return e.nextElement(); 34 } 35 36 public void remove() { 37 throw new UnsupportedOperationException ("Cannot remove elements from an Enumerator"); 38 } 39 } 40 | Popular Tags |