1 // Copyright 2000-2005 the Contributors, as shown in the revision logs.
2 // Licensed under the Apache Public Source License 2.0 ("the License").
3 // You may not use this file except in compliance with the License.
8 public class CounterEnumeration implements Enumeration {
11 public CounterEnumeration(int i) { max = i; }
12 public void reset() { cur = 0; }
13 public boolean hasMoreElements() { return cur < max; }
14 public Object nextElement() { return new Integer(cur++); }