1 package antlr.collections; 2 3 /* ANTLR Translator Generator 4 * Project led by Terence Parr at http://www.jGuru.com 5 * Software rights: http://www.antlr.org/RIGHTS.html 6 * 7 * $Id: //depot/code/org.antlr/main/main/antlr/collections/Enumerator.java#4 $ 8 */ 9 10 public interface Enumerator { 11 /**Return the element under the cursor; return null if !valid() or 12 * if called before first next() call. 13 */ 14 public Object cursor(); 15 16 /**Return the next element in the enumeration; first call to next() 17 * returns the first element. 18 */ 19 public Object next(); 20 21 /**Any more elements in the enumeration? */ 22 public boolean valid(); 23 } 24