corda/classpath/java/util/Stack.java

21 lines
299 B
Java
Raw Normal View History

2007-07-22 03:47:29 +00:00
package java.util;
public class Stack<T> extends Vector<T> {
public boolean empty() {
return size() != 0;
}
public T peek() {
return get(size() - 1);
}
public T pop() {
return remove(size() - 1);
}
public T push(T element) {
add(element);
return element;
}
}