it.unimi.dsi.fastutil.shorts
Class AbstractShortStack

java.lang.Object
  extended byit.unimi.dsi.fastutil.AbstractStack
      extended byit.unimi.dsi.fastutil.shorts.AbstractShortStack
All Implemented Interfaces:
ShortStack, Stack

public abstract class AbstractShortStack
extends AbstractStack
implements ShortStack

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
 Object peek(int i)
          Delegates to the corresponding type-specific method.
 short peekShort(int i)
          Delegates to the corresponding generic method.
 Object pop()
          Delegates to the corresponding type-specific method.
 short popShort()
          Delegates to the corresponding generic method.
 void push(Object o)
          Delegates to the corresponding type-specific method.
 void push(short k)
          Delegates to the corresponding generic method.
 Object top()
          Delegates to the corresponding type-specific method.
 short topShort()
          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(Object o)
Delegates to the corresponding type-specific method.

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

pop

public Object pop()
Delegates to the corresponding type-specific method.

Specified by:
pop in interface Stack
Returns:
the top of the stack.

top

public Object top()
Delegates to the corresponding type-specific method.

Specified by:
top in interface Stack
Overrides:
top in class AbstractStack

peek

public Object peek(int i)
Delegates to the corresponding type-specific method.

Specified by:
peek in interface Stack
Overrides:
peek in class AbstractStack

push

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

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

popShort

public short popShort()
Delegates to the corresponding generic method.

Specified by:
popShort in interface ShortStack
See Also:
Stack.pop()

topShort

public short topShort()
Delegates to the corresponding generic method.

Specified by:
topShort in interface ShortStack
See Also:
Stack.top()

peekShort

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

Specified by:
peekShort in interface ShortStack
See Also:
Stack.peek(int)