it.unimi.dsi.fastutil.floats
Class AbstractFloatStack

java.lang.Object
  extended by it.unimi.dsi.fastutil.AbstractStack<Float>
      extended by it.unimi.dsi.fastutil.floats.AbstractFloatStack
All Implemented Interfaces:
FloatStack, Stack<Float>

public abstract class AbstractFloatStack
extends AbstractStack<Float>
implements FloatStack

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
 Float peek(int i)
          Delegates to the corresponding type-specific method.
 float peekFloat(int i)
          Delegates to the corresponding generic method.
 Float pop()
          Delegates to the corresponding type-specific method.
 float popFloat()
          Delegates to the corresponding generic method.
 void push(float k)
          Delegates to the corresponding generic method.
 void push(Float o)
          Delegates to the corresponding type-specific method.
 Float top()
          Delegates to the corresponding type-specific method.
 float topFloat()
          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(Float o)
Delegates to the corresponding type-specific method.

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

pop

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

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

top

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

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

peek

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

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

push

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

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

popFloat

public float popFloat()
Delegates to the corresponding generic method.

Specified by:
popFloat in interface FloatStack
See Also:
Stack.pop()

topFloat

public float topFloat()
Delegates to the corresponding generic method.

Specified by:
topFloat in interface FloatStack
See Also:
Stack.top()

peekFloat

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

Specified by:
peekFloat in interface FloatStack
See Also:
Stack.peek(int)