Class DoublyLinkedList<T>

java.lang.Object
edu.berkeley.cs.jqf.instrument.util.DoublyLinkedList<T>
All Implemented Interfaces:
Stack<T>, Iterable<T>

public class DoublyLinkedList<T> extends Object implements Iterable<T>, Stack<T>
Author:
Rohan Padhye
  • Constructor Details

    • DoublyLinkedList

      public DoublyLinkedList()
  • Method Details

    • addFirst

      public void addFirst(T value)
    • addLast

      public void addLast(T value)
    • removeFirst

      public T removeFirst()
    • removeLast

      public T removeLast()
    • remove

      public boolean remove(T item)
    • size

      public int size()
    • push

      public void push(T item)
      Specified by:
      push in interface Stack<T>
    • peek

      public T peek()
      Specified by:
      peek in interface Stack<T>
    • pop

      public T pop()
      Specified by:
      pop in interface Stack<T>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Stack<T>
    • clear

      public void clear()
      Specified by:
      clear in interface Stack<T>
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • synchronizedAddFirst

      public void synchronizedAddFirst(T item)
    • synchronizedAddLast

      public void synchronizedAddLast(T item)
    • synchronizedRemove

      public boolean synchronizedRemove(T item)
    • synchronizedRemoveFirst

      public T synchronizedRemoveFirst()
    • synchronizedRemoveLast

      public T synchronizedRemoveLast()
    • toString

      public String toString()
      Overrides:
      toString in class Object