001/*
002 * To change this template, choose Tools | Templates
003 * and open the template in the editor.
004 */
005package sec.sun.awt.geom;
006
007import java.util.ArrayList;
008
009/**
010 *
011 * @author Michael Deutch
012 */
013public class Enumeration {
014
015    private ArrayList _vector = null;
016    private int currentIndex = 0;
017
018    public Enumeration(ArrayList vector) {
019        _vector = vector;
020    }
021
022    public Object nextElement() {
023        if (currentIndex < _vector.size()) {
024            return _vector.get(currentIndex++);
025        } else {
026            return null;
027        }
028    }
029
030    public boolean hasMoreElements() {
031        if (currentIndex < _vector.size()) {
032            return true;
033        } else {
034            return false;
035        }
036    }
037}