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,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 EgetElement()Retrieves the element stored at this position in the list.@Nullable TgetNext()Retrieves the next entry in the list, ornullif this is the last entry.@Nullable TgetPrev()Retrieves the previous entry in the list, ornullif this is the first entry.voidsetNext(@Nullable T next)Sets the successor of this entry.voidsetPrev(@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, ornullif 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, ornullif this is the last entry.- Returns:
- the next entry or
null.
-
-