public class ImmutableStack<T> extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
contains(T entry) |
static <T> ImmutableStack<T> |
emptyStack() |
boolean |
equals(Object o) |
T |
get(int i) |
static int |
getMaxSize() |
int |
hashCode() |
boolean |
isEmpty() |
T |
peek() |
ImmutableStack<T> |
pop() |
ImmutableStack<T> |
popAll(ImmutableStack<T> other) |
ImmutableStack<T> |
push(T entry) |
ImmutableStack<T> |
pushAll(ImmutableStack<T> other) |
ImmutableStack<T> |
reverse() |
int |
size() |
boolean |
topMatches(ImmutableStack<T> other) |
String |
toString() |
public static int getMaxSize()
public static final <T> ImmutableStack<T> emptyStack()
public ImmutableStack<T> push(T entry)
public T peek()
public ImmutableStack<T> pop()
public boolean isEmpty()
public int size()
public T get(int i)
public boolean contains(T entry)
public boolean topMatches(ImmutableStack<T> other)
public ImmutableStack<T> reverse()
public ImmutableStack<T> popAll(ImmutableStack<T> other)
public ImmutableStack<T> pushAll(ImmutableStack<T> other)