Interface LinkedListEntry<E,T extends LinkedListEntry<E,T>>
-
- Type Parameters:
E
- element class.T
- linked list entry class.
- All Superinterfaces:
ElementReference
- All Known Implementing Classes:
AbstractBasicLinkedListEntry
,Block
,DefaultLinkedListEntry
public interface LinkedListEntry<E,T extends LinkedListEntry<E,T>> extends ElementReference
Basic interface for entries in a linked list.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description E
getElement()
Retrieves the element stored at this position in the list.@Nullable T
getNext()
Retrieves the next entry in the list, ornull
if this is the last entry.@Nullable T
getPrev()
Retrieves the previous entry in the list, ornull
if this is the first entry.void
setNext(@Nullable T next)
Sets the successor of this entry.void
setPrev(@Nullable T prev)
Sets the predecessor of this entry.
-
-
-
Method Detail
-
getElement
E getElement()
Retrieves the element stored at this position in the list.- Returns:
- the element.
-
getPrev
@Nullable T getPrev()
Retrieves the previous entry in the list, ornull
if this is the first entry.- Returns:
- the previous entry or
null
.
-
setPrev
void setPrev(@Nullable T prev)
Sets the predecessor of this entry.- Parameters:
prev
- the new predecessor.
-
getNext
@Nullable T getNext()
Retrieves the next entry in the list, ornull
if this is the last entry.- Returns:
- the next entry or
null
.
-
-