![]() |
AuD
Lecture 'Algorithmen und Datenstrukturen' (code examples)
|
Implementation of a stack based on aud.Vector.
More...
Inheritance diagram for aud.Stack< T >:
Collaboration diagram for aud.Stack< T >:Public Member Functions | |
| Stack () | |
| boolean | is_empty () |
| Is stack empty? More... | |
| T | top () throws NoSuchElementException |
| Get stack top. More... | |
| T | pop () throws NoSuchElementException |
| Pop element from stack. More... | |
| void | push (T x) |
| Push x onto stack. More... | |
Public Member Functions inherited from aud.adt.AbstractStack< T > | |
| abstract boolean | is_empty () |
| Is stack empty? More... | |
| abstract T | top () |
| Get stack top. More... | |
| abstract T | pop () |
| Pop element from stack. More... | |
| abstract void | push (T x) |
| Push x onto stack. More... | |
| String | toString () |
Get string representation "|a|b|c". More... | |
Additional Inherited Members | |
Protected Member Functions inherited from aud.adt.AbstractStack< T > | |
| AbstractStack () | |
| create empty stack More... | |
Implementation of a stack based on aud.Vector.
Definition at line 8 of file Stack.java.
Definition at line 11 of file Stack.java.
| boolean aud.Stack< T >.is_empty | ( | ) |
Is stack empty?
Reimplemented from aud.adt.AbstractStack< T >.
Definition at line 14 of file Stack.java.
Referenced by aud.example.IterativePreorderTraversal.iterative_traversal(), aud.example.graph.IterativeDFS1.start(), aud.example.graph.IterativeDFS2.start(), aud.test.StackTest.testStack(), and aud.example.VerboseStack< T >.toString().
Here is the caller graph for this function:| T aud.Stack< T >.pop | ( | ) | throws NoSuchElementException |
Pop element from stack.
Requires !is_empty().
| NoSuchElementException |
Reimplemented from aud.adt.AbstractStack< T >.
Reimplemented in aud.example.VerboseStack< T >.
Definition at line 23 of file Stack.java.
Referenced by aud.example.graph.IterativeDFS1.start(), aud.example.graph.IterativeDFS2.start(), aud.test.StackTest.testInvalid_pop(), and aud.test.StackTest.testStack().
Here is the caller graph for this function:| void aud.Stack< T >.push | ( | T | x | ) |
Push x onto stack.
| x | new element |
Reimplemented from aud.adt.AbstractStack< T >.
Reimplemented in aud.example.VerboseStack< T >.
Definition at line 31 of file Stack.java.
Referenced by aud.example.grid.Grid.dfs_iterative(), aud.example.graph.IterativeDFS1.start(), aud.example.graph.IterativeDFS2.start(), and aud.test.StackTest.testStack().
Here is the caller graph for this function:| T aud.Stack< T >.top | ( | ) | throws NoSuchElementException |
Get stack top.
Requires !is_empty().
| NoSuchElementException |
Reimplemented from aud.adt.AbstractStack< T >.
Definition at line 17 of file Stack.java.
Referenced by aud.test.StackTest.testInvalid_top(), and aud.test.StackTest.testStack().
Here is the caller graph for this function: