Class SinglyLinkedListNode<E>

Type Parameters

  • E = any

Constructors

Accessors

Constructors

  • The constructor function initializes an instance of a class with a given value and sets the next property to undefined.

    Type Parameters

    • E = any

    Parameters

    • value: E

      The "value" parameter is of type E, which means it can be any data type. It represents the value that will be stored in the node of a linked list.

    Returns SinglyLinkedListNode<E>

Accessors

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

    Returns undefined | SinglyLinkedListNode<E>

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

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

    Parameters

    • value: undefined | SinglyLinkedListNode<E>

      The value parameter is of type SinglyLinkedListNode<E> | undefined. This means that it can accept either a SinglyLinkedListNode 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

Generated using TypeDoc