Class DListNode<X>

java.lang.Object
Jcg.util.DListNode<X>

public class DListNode<X> extends Object
Node of a doubly linked list, for storing generic type elements.

Remark: the list can be circular (if needed)
Author:
Luca Castelli Aleardi (Ecole Polytechnique, 2013-2024)
  • Field Details

    • element

      public X element
      (generic) data stored in a node of the list
    • next

      DListNode<X> next
      a reference to the next node in the list
    • previous

      DListNode<X> previous
      a reference to the previous node in the list
  • Constructor Details

  • Method Details

    • getElement

      public X getElement()
    • getNext

      public DListNode<X> getNext()
    • getPrev

      public DListNode<X> getPrev()
    • setElement

      public void setElement(X element)
    • setNext

      public void setNext(DListNode<X> next)
    • setPrev

      public void setPrev(DListNode<X> prev)