home *** CD-ROM | disk | FTP | other *** search
- import java.util.Enumeration;
-
- class Enum implements Enumeration {
- private int count;
- private boolean more = true;
-
- public boolean hasMoreElements() {
- return this.more;
- }
-
- public Object nextElement() {
- ++this.count;
- if (this.count > 4) {
- this.more = false;
- }
-
- return new Integer(this.count);
- }
- }
-