Class DoublyLinkedListNode<E>

Type Parameters

  • E = any

Constructors

Accessors

Constructors

  • The constructor function initializes the value, next, and previous properties of an object.

    Type Parameters

    • E = any

    Parameters

    • value: E

      The "value" parameter is the value that will be stored in the node. It can be of any data type, as it is defined as a generic type "E".

    Returns DoublyLinkedListNode<E>

Accessors

  • get next(): undefined | DoublyLinkedListNode<E>
  • The "next" function returns the next node in a doubly linked list.

    Returns undefined | DoublyLinkedListNode<E>

    The next property is being returned. It can be either a DoublyLinkedListNode<E> object or undefined.

  • set next(value): void
  • The "next" property of a DoublyLinkedListNode is set to the provided value.

    Parameters

    • value: undefined | DoublyLinkedListNode<E>

      The value parameter is of type DoublyLinkedListNode<E> | undefined. This means that it can accept either a DoublyLinkedListNode object or undefined as its value.

    Returns void

  • get prev(): undefined | DoublyLinkedListNode<E>
  • The prev function returns the previous node in a doubly linked list.

    Returns undefined | DoublyLinkedListNode<E>

    The prev property of the DoublyLinkedListNode class is being returned. It can either be a DoublyLinkedListNode object or undefined.

  • set prev(value): void
  • The function sets the previous node of a doubly linked list node.

    Parameters

    • value: undefined | DoublyLinkedListNode<E>

      The value parameter is of type DoublyLinkedListNode<E> | undefined. This means that it can accept either a DoublyLinkedListNode object or undefined as its value.

    Returns void

  • get value(): E
  • The function returns the value of a protected variable.

    Returns E

    The value of the variable _value is being returned.

  • set value(value): void
  • The above function sets the value of a variable.

    Parameters

    • value: E

      The parameter "value" is of type E, which means it can be any type.

    Returns void