Interface BoundedList.INode<T>
-
- Type Parameters:
T
- type of the stored elements
- Enclosing class:
- BoundedList<T>
public static interface BoundedList.INode<T>
The list elements are stored in nodes that takes care of the actual linking. This interface can be implemented by a class that is to be stored in a BoundedList in order to avoid wrapping the values.The most obvious implementation of these methods by a class is like this:
public INode<MyValue> getNext() { return next; } public void setNext(INode<MyValue> next) { this.next = next; } public MyValue getValue() { return this; }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BoundedList.INode<T>
getNext()
Get the next node in the list.T
getValue()
Get the value of this node.void
setNext(BoundedList.INode<T> next)
Set the next node in the list.
-
-
-
Method Detail
-
getNext
BoundedList.INode<T> getNext()
Get the next node in the list.- Returns:
- the next node
-
setNext
void setNext(BoundedList.INode<T> next)
Set the next node in the list.- Parameters:
next
- the next node
-
getValue
T getValue()
Get the value of this node.- Returns:
- the node value
-
-