1 20 21 22 23 package org.snmp4j.util; 24 25 import java.util.*; 26 27 35 public class EnumerationIterator implements Iterator { 36 37 private Enumeration e; 38 39 public EnumerationIterator(Enumeration e) { 40 this.e = e; 41 } 42 43 48 public boolean hasNext() { 49 return e.hasMoreElements(); 50 } 51 52 57 public Object next() { 58 return e.nextElement(); 59 } 60 61 64 public void remove() { 65 throw new UnsupportedOperationException (); 66 } 67 } 68 | Popular Tags |