1 package antlr.collections; 2 3 public interface Enumerator { 4 5 6 /**Return the element under the cursor; return null if !valid() or 7 * if called before first next() call. 8 */ 9 public Object cursor(); 10 /**Return the next element in the enumeration; first call to next() 11 * returns the first element. 12 */ 13 public Object next(); 14 /**Any more elements in the enumeration? */ 15 public boolean valid(); 16 } 17