public class ImmutableStack<T>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
contains(T entry) |
static <T> ImmutableStack<T> |
emptyStack() |
boolean |
equals(java.lang.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) |
java.lang.String |
toString() |
public static int getMaxSize()
public static final <T> ImmutableStack<T> emptyStack()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
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 java.lang.String toString()
toString
in class java.lang.Object
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)