it.unimi.dsi.fastutil.doubles
Class AbstractDoubleStack

java.lang.Object
  extended by it.unimi.dsi.fastutil.AbstractStack<Double>
      extended by it.unimi.dsi.fastutil.doubles.AbstractDoubleStack
All Implemented Interfaces:
DoubleStack, Stack<Double>

public abstract class AbstractDoubleStack
extends AbstractStack<Double>
implements DoubleStack

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
 Double peek(int i)
          Delegates to the corresponding type-specific method.
 double peekDouble(int i)
          Delegates to the corresponding generic method.
 Double pop()
          Delegates to the corresponding type-specific method.
 double popDouble()
          Delegates to the corresponding generic method.
 void push(double k)
          Delegates to the corresponding generic method.
 void push(Double o)
          Delegates to the corresponding type-specific method.
 Double top()
          Delegates to the corresponding type-specific method.
 double topDouble()
          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(Double o)
Delegates to the corresponding type-specific method.

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

pop

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

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

top

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

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

peek

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

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

push

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

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

popDouble

public double popDouble()
Delegates to the corresponding generic method.

Specified by:
popDouble in interface DoubleStack
See Also:
Stack.pop()

topDouble

public double topDouble()
Delegates to the corresponding generic method.

Specified by:
topDouble in interface DoubleStack
See Also:
Stack.top()

peekDouble

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

Specified by:
peekDouble in interface DoubleStack
See Also:
Stack.peek(int)