T - the type of items on the listpublic class DoublyLinkedList<T extends DoublyLinked<?>> extends DoublyLinked<T>
| Constructor and Description |
|---|
DoublyLinkedList() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFirst(DoublyLinked<T> link)
Add a new link at the head of the list.
|
T |
getFirst()
Get the first item on the list.
|
T |
getLast()
Get the last item on the list.
|
void |
remove()
Link around this item in the list, clearing this item's next
and previous pointers so it can't affect the list in any way
in the future.
|
void |
removeUnsafe()
Link around this item in the list, without clearing this item's
next and previous pointers.
|
addAfter, addBefore, getNext, getPrevious, isOnListpublic T getFirst()
public T getLast()
public void addFirst(DoublyLinked<T> link)
link - the link to addpublic void removeUnsafe()
DoublyLinkedremoveUnsafe in class DoublyLinked<T extends DoublyLinked<?>>public void remove()
DoublyLinkedremove in class DoublyLinked<T extends DoublyLinked<?>>