|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.AbstractStack<Integer>
it.unimi.dsi.fastutil.ints.AbstractIntStack
public abstract class AbstractIntStack
An abstract class providing basic methods for implementing a type-specific stack interface.
To create a type-specific stack, you need both object methods and primitive-type methods. However, if you inherit from this class you need just one (anyone).
Method Summary | |
---|---|
Integer |
peek(int i)
Delegates to the corresponding type-specific method. |
int |
peekInt(int i)
Delegates to the corresponding generic method. |
Integer |
pop()
Delegates to the corresponding type-specific method. |
int |
popInt()
Delegates to the corresponding generic method. |
void |
push(int k)
Delegates to the corresponding generic method. |
void |
push(Integer o)
Delegates to the corresponding type-specific method. |
Integer |
top()
Delegates to the corresponding type-specific method. |
int |
topInt()
Delegates to the corresponding generic method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
---|
isEmpty |
Method Detail |
---|
public void push(Integer o)
push
in interface Stack<Integer>
o
- the object that will become the new top of the stack.public Integer pop()
pop
in interface Stack<Integer>
public Integer top()
top
in interface Stack<Integer>
top
in class AbstractStack<Integer>
public Integer peek(int i)
peek
in interface Stack<Integer>
peek
in class AbstractStack<Integer>
i
-th element on the stack; 0 represents the top.public void push(int k)
push
in interface IntStack
Stack.push(Object)
public int popInt()
popInt
in interface IntStack
Stack.pop()
public int topInt()
topInt
in interface IntStack
Stack.top()
public int peekInt(int i)
peekInt
in interface IntStack
Stack.peek(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |