Class DLinked_StackGeneric<E>

java.lang.Object
DLinked_StackGeneric<E>
Type Parameters:
E - Type of element stored in the list.
All Implemented Interfaces:
StackGeneric_Interface<E>

public class DLinked_StackGeneric<E> extends Object implements StackGeneric_Interface<E>
A generic stack implemented with a doubly linked list.
Author:
Dr. Lillis
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an empty stack.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes all elements from this stack.
    boolean
    Returns true if this stack is empty, returns false otherwise.
    Returns but does not remove the element at the top of this stack.
    pop()
    Removes and returns the element at the top of this stack.
    void
    push(E element)
    Adds the given element to the top of the stack.
    int
    Returns the number of elements in this stack.
    Returns a string containing each element in this list, separated by commas, enclosed in square brackets.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait