1 // Copyright (C) 2004 Adam Megacz <adam@ibex.org> all rights reserved.
3 // You may modify, copy, and redistribute this code under the terms of
4 // the GNU Library Public License version 2.1, with the exception of
5 // the portion of clause 6a after the semicolon (aka the "obnoxious
10 public class CounterEnumeration implements Enumeration {
13 public CounterEnumeration(int i) { max = i; }
14 public void reset() { cur = 0; }
15 public boolean hasMoreElements() { return cur < max; }
16 public Object nextElement() { return new Integer(cur++); }