it.unimi.dsi.fastutil.ints
Class AbstractIntStack

java.lang.Object
  extended by it.unimi.dsi.fastutil.AbstractStack<java.lang.Integer>
      extended by it.unimi.dsi.fastutil.ints.AbstractIntStack
All Implemented Interfaces:
IntStack, Stack<java.lang.Integer>

public abstract class AbstractIntStack
extends AbstractStack<java.lang.Integer>
implements IntStack

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
 java.lang.Integer peek(int i)
          Delegates to the corresponding type-specific method.
 int peekInt(int i)
          Delegates to the corresponding generic method.
 java.lang.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(java.lang.Integer o)
          Delegates to the corresponding type-specific method.
 java.lang.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

push

public void push(java.lang.Integer o)
Delegates to the corresponding type-specific method.

Specified by:
push in interface Stack<java.lang.Integer>
Parameters:
o - the object that will become the new top of the stack.

pop

public java.lang.Integer pop()
Delegates to the corresponding type-specific method.

Specified by:
pop in interface Stack<java.lang.Integer>
Returns:
the top of the stack.

top

public java.lang.Integer top()
Delegates to the corresponding type-specific method.

Specified by:
top in interface Stack<java.lang.Integer>
Overrides:
top in class AbstractStack<java.lang.Integer>
Returns:
the top of the stack.

peek

public java.lang.Integer peek(int i)
Delegates to the corresponding type-specific method.

Specified by:
peek in interface Stack<java.lang.Integer>
Overrides:
peek in class AbstractStack<java.lang.Integer>
Returns:
the i-th element on the stack; 0 represents the top.

push

public void push(int k)
Delegates to the corresponding generic method.

Specified by:
push in interface IntStack
See Also:
Stack.push(Object)

popInt

public int popInt()
Delegates to the corresponding generic method.

Specified by:
popInt in interface IntStack
See Also:
Stack.pop()

topInt

public int topInt()
Delegates to the corresponding generic method.

Specified by:
topInt in interface IntStack
See Also:
Stack.top()

peekInt

public int peekInt(int i)
Delegates to the corresponding generic method.

Specified by:
peekInt in interface IntStack
See Also:
Stack.peek(int)