package util.list;
import java.util.NoSuchElementException;
import java.util.Enumeration;
public class VectorEnumeration implements Enumeration {
private Vector vect = null;
private int cursor = 0;
public VectorEnumeration(Vector v) {
vect = v;
}
public boolean hasMoreElements() {
return cursor < vect.getSize();
}
public Object nextElement() throws NoSuchElementException {
if (!hasMoreElements())
throw new NoSuchElementException();
return vect.getElementAt(cursor++);
}
}