01:/*
02: * $Id: EnumerationToIterator.java,v 1.2 2002/09/16 08:05:03 jkl Exp $
03: *
04: * Copyright (c) 2002 Njet Communications Ltd. All Rights Reserved.
05: *
06: * Use is subject to license terms, as defined in
07: * Anvil Sofware License, Version 1.1. See LICENSE
08: * file, or http://njet.org/license-1.1.txt
09: */
10:package anvil.java.util;
11:
12:import java.util.Iterator;
13:import java.util.Enumeration;
14:
15:public class EnumerationToIterator implements Iterator
16:{
17:
18: protected Enumeration _enum;
19:
20: public EnumerationToIterator(Enumeration enum)
21: {
22: _enum = enum;
23: }
24:
25: public boolean hasNext()
26: {
27: return _enum.hasMoreElements();
28: }
29:
30: public Object next()
31: {
32: return _enum.nextElement();
33: }
34:
35: public void remove()
36: {
37: }
38:
39:}
|