- java.lang.Object
-
- org.jgrapht.util.DoublyLinkedList.ListNodeImpl<V>
-
- All Implemented Interfaces:
DoublyLinkedList.ListNode<V>
- Enclosing class:
- DoublyLinkedList<E>
private static class DoublyLinkedList.ListNodeImpl<V> extends java.lang.Object implements DoublyLinkedList.ListNode<V>
The defaultDoublyLinkedList.ListNode
implementation that enables checks and enforcement of a single container list policy.
-
-
Field Summary
Fields Modifier and Type Field Description private DoublyLinkedList<V>
list
private DoublyLinkedList.ListNodeImpl<V>
next
private DoublyLinkedList.ListNodeImpl<V>
prev
private V
value
-
Constructor Summary
Constructors Constructor Description ListNodeImpl(V value)
Creates new list node
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoublyLinkedList.ListNodeImpl<V>
getNext()
Returns the next node in the list structure with respect to this nodeDoublyLinkedList.ListNodeImpl<V>
getPrev()
Returns the previous node in the list structure with respect to this nodeV
getValue()
Returns the immutable value thisListNode
contains.java.lang.String
toString()
-
-
-
Field Detail
-
value
private final V value
-
list
private DoublyLinkedList<V> list
-
next
private DoublyLinkedList.ListNodeImpl<V> next
-
prev
private DoublyLinkedList.ListNodeImpl<V> prev
-
-
Constructor Detail
-
ListNodeImpl
ListNodeImpl(V value)
Creates new list node- Parameters:
value
- the value this list node stores
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getValue
public V getValue()
Returns the immutable value thisListNode
contains.- Specified by:
getValue
in interfaceDoublyLinkedList.ListNode<V>
- Returns:
- the value this list node contains
-
getNext
public DoublyLinkedList.ListNodeImpl<V> getNext()
Returns the next node in the list structure with respect to this node- Specified by:
getNext
in interfaceDoublyLinkedList.ListNode<V>
- Returns:
- the next node in the list structure with respect to this node
-
getPrev
public DoublyLinkedList.ListNodeImpl<V> getPrev()
Returns the previous node in the list structure with respect to this node- Specified by:
getPrev
in interfaceDoublyLinkedList.ListNode<V>
- Returns:
- the previous node in the list structure with respect to this node
-
-