package util.jgp.adaptor;
import java.util.NoSuchElementException;
import java.util.Enumeration;
import util.jgp.container.Vector;
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++);
}
}