package org.warp.commonutils.type; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.warp.commonutils.error.IndexOutOfBoundsException; /** * A stack * *
A stack must provide the classical {@link #push(Object)} and
* {@link #pop()} operations, but may be also peekable to some extent: it may provide just the {@link #top()}
* function, or even a more powerful {@link #peek(int)} method that provides access to all elements on the stack
* (indexed from the top, which has index 0).
*/
public interface Stack