Interface BoundedList.INode<T>
- Type Parameters:
T
- type of the stored elements
- All Known Implementing Classes:
DefaultTimestampedData
- 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
Modifier and TypeMethodDescriptiongetNext()
Get the next node in the list.getValue()
Get the value of this node.void
setNext
(BoundedList.INode<T> next) Set the next node in the list.
-
Method Details
-
getNext
BoundedList.INode<T> getNext()Get the next node in the list.- Returns:
- the next node
-
setNext
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
-