corda/classpath/java/util/Stack.java
2007-07-21 21:47:29 -06:00

21 lines
299 B
Java

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;
}
}