Package cs2110
Class DLinkedSeq.DNode
java.lang.Object
cs2110.DLinkedSeq.DNode
- Enclosing class:
DLinkedSeq<T>
A node of a doubly-linked sequence whose elements have type `T`.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final T
The element in this node.(package private) DLinkedSeq<T>.DNode
Next node in the sequence (null if this is the last node).(package private) DLinkedSeq<T>.DNode
Previous node in the sequence (null if this is the first node). -
Constructor Summary
ConstructorsConstructorDescriptionDNode
(T elem, DLinkedSeq<T>.DNode prev, DLinkedSeq<T>.DNode next) Create a Node containing element `elem`, pointing backward to node 'prev' (may be null), and pointing forward to node `next` (may be null). -
Method Summary
-
Field Details
-
data
The element in this node. -
next
DLinkedSeq<T>.DNode nextNext node in the sequence (null if this is the last node). -
prev
DLinkedSeq<T>.DNode prevPrevious node in the sequence (null if this is the first node).
-
-
Constructor Details
-
DNode
DNode(T elem, DLinkedSeq<T>.DNode prev, DLinkedSeq<T>.DNode next) Create a Node containing element `elem`, pointing backward to node 'prev' (may be null), and pointing forward to node `next` (may be null).
-