it.unimi.dsi.fastutil.booleans
Class AbstractBooleanStack

java.lang.Object
  extended by it.unimi.dsi.fastutil.AbstractStack<Boolean>
      extended by it.unimi.dsi.fastutil.booleans.AbstractBooleanStack
All Implemented Interfaces:
BooleanStack, Stack<Boolean>

public abstract class AbstractBooleanStack
extends AbstractStack<Boolean>
implements BooleanStack

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
 Boolean peek(int i)
          Delegates to the corresponding type-specific method.
 boolean peekBoolean(int i)
          Delegates to the corresponding generic method.
 Boolean pop()
          Delegates to the corresponding type-specific method.
 boolean popBoolean()
          Delegates to the corresponding generic method.
 void push(boolean k)
          Delegates to the corresponding generic method.
 void push(Boolean o)
          Delegates to the corresponding type-specific method.
 Boolean top()
          Delegates to the corresponding type-specific method.
 boolean topBoolean()
          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(Boolean o)
Delegates to the corresponding type-specific method.

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

pop

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

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

top

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

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

peek

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

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

push

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

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

popBoolean

public boolean popBoolean()
Delegates to the corresponding generic method.

Specified by:
popBoolean in interface BooleanStack
See Also:
Stack.pop()

topBoolean

public boolean topBoolean()
Delegates to the corresponding generic method.

Specified by:
topBoolean in interface BooleanStack
See Also:
Stack.top()

peekBoolean

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

Specified by:
peekBoolean in interface BooleanStack
See Also:
Stack.peek(int)