Class AbstractSinglyLinkedList<N>Abstract

Abstract base class for singly linked list implementations.

Defines the contract for forward-only linked structures with head-to-tail traversal.

Extends AbstractLinkedList with specialized behavior for singly linked nodes.

class MySinglyLinkedList extends AbstractSinglyLinkedList {
// Implement abstract methods
}

Type Parameters

Hierarchy (View Summary)

Constructors

Methods

  • Returns an iterator for traversing the list. Supports both forward and reverse traversal.

    Parameters

    • reversed: boolean

      If true, the iterator will traverse the list in reverse order.

    Returns Generator<N, void, void>

    An iterator yielding nodes in the specified orders.