|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectLinkedListStack<E>
public class LinkedListStack<E>
Class that represents a stack using a linked list of objects
| Constructor Summary | |
|---|---|
LinkedListStack()
Constructor that takes no arguments |
|
| Method Summary | |
|---|---|
boolean |
isEmpty()
Method to test if the stack is empty |
E |
peek()
Method to return the top element on the stack but leave the element on the stack |
E |
pop()
Method to remove the top element from a stack and return it |
void |
push(E element)
Method to add an element to the stack |
int |
size()
Method to get the number of elements in the stack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LinkedListStack()
| Method Detail |
|---|
public void push(E element)
push in interface Stack<E>element - the element to addpublic E peek()
peek in interface Stack<E>public E pop()
pop in interface Stack<E>public int size()
size in interface Stack<E>public boolean isEmpty()
isEmpty in interface Stack<E>
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||