001 package org.shiftone.jrat.util.collection;
002
003 import java.util.Enumeration;
004
005 /**
006 * @author jeff@shiftone.org (Jeff Drost)
007 */
008 public class ArrayEnumeration implements Enumeration {
009
010 private Object[] array;
011 private int index = 0;
012
013 public ArrayEnumeration(Object[] array) {
014 this.array = array;
015 }
016
017 public boolean hasMoreElements() {
018 return index < array.length;
019 }
020
021 public Object nextElement() {
022 return array[index++];
023 }
024 }