Package trial.gaurav.collection
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>
Inner class representing a node in the linked list.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
data
-
next
-
-
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
Retrieves the data value stored in the node.- Returns:
- The data value.
-