Class DoublyLinkedList.ListNode<V>

  • Type Parameters:
    V - the type of the element stored in this node
    Enclosing class:
    DoublyLinkedList<E>

    public abstract static class DoublyLinkedList.ListNode<V>
    extends Object
    Container for the elements stored in a DoublyLinkedList.

    A DoublyLinkedList.ListNode is either contained exactly once in exactly one DoublyLinkedList or contained in no DoublyLinkedList.

    • Method Detail

      • getValue

        public abstract V getValue()
        Returns the immutable value this ListNode contains.
        Returns:
        the value this list node contains
      • getNext

        public abstract DoublyLinkedList.ListNode<V> getNext()
        Returns the next node in the list structure with respect to this node
        Returns:
        the next node in the list structure with respect to this node
      • getPrev

        public abstract DoublyLinkedList.ListNode<V> getPrev()
        Returns the previous node in the list structure with respect to this node
        Returns:
        the previous node in the list structure with respect to this node
      • getList

        public DoublyLinkedList<V> getList()
        Returns the list that this node is a member of.
        Returns:
        the list that this node is a member of
        Since:
        1.5.3
      • toString

        public String toString()
        Returns the string representation of this list node.
        Overrides:
        toString in class Object
        Returns:
        the string representation of this list node