JavaAlgorithms
Elementary and no so elementary Java algorithms
listAlgorithms.Stack< T extends Comparable< T > > Class Reference

List of all members.

Public Member Functions

void push (T val)
peek ()
pop ()
void printStack ()

Protected Member Functions

void popTop ()

Detailed Description

Stack

A stack based on a linked list.

Jun 20, 2013

Author:
Ian Kaplan, iank@bearcave.com
Parameters:
<T>a type that implements Comparable

Definition at line 22 of file Stack.java.


Member Function Documentation

T listAlgorithms.Stack< T extends Comparable< T > >.peek ( )
Returns:
the top of stack value, without removing it.

Definition at line 50 of file Stack.java.

T listAlgorithms.Stack< T extends Comparable< T > >.pop ( )
Returns:
the top of stack value, removing the the top of stack element

Definition at line 61 of file Stack.java.

void listAlgorithms.Stack< T extends Comparable< T > >.popTop ( ) [protected]

Remove the top element from the stack

Definition at line 39 of file Stack.java.

void listAlgorithms.Stack< T extends Comparable< T > >.printStack ( )

Definition at line 67 of file Stack.java.

void listAlgorithms.Stack< T extends Comparable< T > >.push ( val)

Push a value on top of the stack.

Parameters:
val

Definition at line 30 of file Stack.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables