Class LinkedList.Node<T>

java.lang.Object
trial.gaurav.collection.LinkedList.Node<T>
Type Parameters:
T - The type of data held by the node.
Enclosing class:
LinkedList<T>

public class LinkedList.Node<T> extends Object
Inner class representing a node in the linked list.
  • Field Details

  • Constructor Details

    • Node

      Node(T value)
      Constructs a new node with the given value.
      Parameters:
      value - The data value to be stored in the node.
  • Method Details

    • getData

      public T getData()
      Retrieves the data value stored in the node.
      Returns:
      The data value.