Class AbstractBasicLinkedListEntry<E,T extends AbstractBasicLinkedListEntry<E,T>>
- java.lang.Object
-
- net.automatalib.common.smartcollection.AbstractBasicLinkedListEntry<E,T>
-
- Type Parameters:
E
- element class.T
- linked list entry class.
- All Implemented Interfaces:
ElementReference
,LinkedListEntry<E,T>
- Direct Known Subclasses:
Block
,DefaultLinkedListEntry
public abstract class AbstractBasicLinkedListEntry<E,T extends AbstractBasicLinkedListEntry<E,T>> extends Object implements LinkedListEntry<E,T>
Abstract base class for entries in a linked list. Takes care for handling predecessor and successor, but not storage of the element itself.
-
-
Constructor Summary
Constructors Constructor Description AbstractBasicLinkedListEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.common.smartcollection.LinkedListEntry
getElement
-
-
-
-
Method Detail
-
getPrev
public @Nullable T getPrev()
Description copied from interface:LinkedListEntry
Retrieves the previous entry in the list, ornull
if this is the first entry.- Specified by:
getPrev
in interfaceLinkedListEntry<E,T extends AbstractBasicLinkedListEntry<E,T>>
- Returns:
- the previous entry or
null
.
-
setPrev
public void setPrev(@Nullable T prev)
Description copied from interface:LinkedListEntry
Sets the predecessor of this entry.- Specified by:
setPrev
in interfaceLinkedListEntry<E,T extends AbstractBasicLinkedListEntry<E,T>>
- Parameters:
prev
- the new predecessor.
-
getNext
public @Nullable T getNext()
Description copied from interface:LinkedListEntry
Retrieves the next entry in the list, ornull
if this is the last entry.- Specified by:
getNext
in interfaceLinkedListEntry<E,T extends AbstractBasicLinkedListEntry<E,T>>
- Returns:
- the next entry or
null
.
-
setNext
public void setNext(@Nullable T next)
Description copied from interface:LinkedListEntry
Sets the successor of this entry.- Specified by:
setNext
in interfaceLinkedListEntry<E,T extends AbstractBasicLinkedListEntry<E,T>>
- Parameters:
next
- the new successor.
-
-