KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > antlr > collections > Stack


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/Stack.java#4 $
8  */

9
10 import java.util.NoSuchElementException JavaDoc;
11
12 /** A simple stack definition; restrictive in that you cannot
13  * access arbitrary stack elements.
14  *
15  * @author Terence Parr
16  * <a HREF=http://www.MageLang.com>MageLang Institute</a>
17  */

18 public interface Stack {
19     public int height();
20
21     public Object JavaDoc pop() throws NoSuchElementException JavaDoc;
22
23     public void push(Object JavaDoc o);
24
25     public Object JavaDoc top() throws NoSuchElementException JavaDoc;
26 }
27
Popular Tags