Class Stack

java.lang.Object
  |
  +--Liste
        |
        +--Stack

public class Stack
extends Liste
implements StackInterface

Klasse, welche StackInterface implementiert

Author:
Antje Nowack
See Also:
Liste, Vergleichbar

Constructor Summary
Stack()
           
 
Method Summary
 Vergleichbar pop()
          Oberstes Element wird vom Stack entfernt und zur\"uckgeliefert.
 void push(Vergleichbar hinzuzufuegen)
          Neues Element wird am oberen Ende (Top) hinzugef\"ugt.
 
Methods inherited from class Liste
drucke, druckeRueckwaerts, empty, erstesElement, fuegeHintenEin, fuegeVorneEin, loesche, loesche, loescheErstes, suche, toString, toStringRueckwaerts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Stack

public Stack()
Method Detail

push

public void push(Vergleichbar hinzuzufuegen)
Neues Element wird am oberen Ende (Top) hinzugef\"ugt.
Specified by:
push in interface StackInterface

pop

public Vergleichbar pop()
Oberstes Element wird vom Stack entfernt und zur\"uckgeliefert.
Specified by:
pop in interface StackInterface
Returns:
Das oberste Element des Stacks, wenn dieser nicht leer ist; null sonst