View Javadoc

1   package net.sf.msplice.stack;
2   
3   import java.util.EmptyStackException;
4   import java.util.Iterator;
5   
6   import net.sf.msplice.model.ISpliceElement;
7   
8   import org.apache.commons.collections.ArrayStack;
9   
10  
11  public class SpliceElementStack {
12  	
13  	private ArrayStack arrayStack = null;
14  	
15  	public SpliceElementStack() {
16  		arrayStack = new ArrayStack();
17  	}
18  
19  	public Iterator iterator() {
20  		return arrayStack.iterator();
21  	}
22  
23  	public boolean empty() {
24  		return arrayStack.empty();
25  	}
26  
27  	public ISpliceElement get() {
28  		return (ISpliceElement)arrayStack.get();
29  	}
30  
31  	public ISpliceElement peek() throws EmptyStackException {
32  		return (ISpliceElement)arrayStack.peek();
33  	}
34  
35  	public Object peek(int index) throws EmptyStackException {
36  		return arrayStack.peek(index);
37  	}
38  
39  	public ISpliceElement pop() throws EmptyStackException {
40  		return (ISpliceElement)arrayStack.pop();
41  	}
42  
43  	public Object push(ISpliceElement spliceElement) {
44  		return arrayStack.push(spliceElement);
45  	}
46  
47  	public ISpliceElement remove() {
48  		return (ISpliceElement)arrayStack.remove();
49  	}
50  
51  	public int search(Object arg0) {
52  		return arrayStack.search(arg0);
53  	}
54  
55  	
56  	
57  
58  }