cz.muni.fi.pb162.stackexample
Class StackElement

java.lang.Object
  extended by cz.muni.fi.pb162.stackexample.StackElement

public class StackElement
extends java.lang.Object

This class represents a stack elememnt for NumberStack

Author:
Rastislav Mirek

Constructor Summary
StackElement(int value, StackElement below)
           
 
Method Summary
 StackElement getBelow()
           
 int getValue()
          Used by stack's metod's when poping top-most element and replacing it by second top-most.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackElement

public StackElement(int value,
                    StackElement below)
Parameters:
value - Value that this StackElement holds.
below - @Null StackElement that is below this element in the stack
Method Detail

getBelow

public StackElement getBelow()
Returns:
StackElement which is under this StackElement in stack or null if this StackElement is bottom-most in the stack.

getValue

public int getValue()
Used by stack's metod's when poping top-most element and replacing it by second top-most.

Returns:
value which is stored in this StackElement