public class LinkedNodeList<T extends LinkedNode<T>> extends Object implements Iterable<T>
| Constructor and Description |
|---|
LinkedNodeList() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFirst(LinkedNodeList<T> list) |
void |
addFirst(T node) |
void |
addLast(LinkedNodeList<T> list) |
void |
addLast(T node) |
void |
clear() |
T |
getHead() |
T |
getTail() |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
T |
reparent(LinkedNodeList<T> list) |
T |
rotate()
Move the head to the tail and returns the new head node.
|
void |
rotateTo(T head)
Move the head to the tail and returns the new head node.
|
int |
size() |
T[] |
toArray(T[] array)
Copies the nodes of the LinkedNodeList to the specified array.
|
ArrayList<T> |
toArrayList()
Copies the nodes of the LinkedNodeList to an ArrayList.
|
ArrayList<T> |
toArrayListReversed()
Copies the nodes of the LinkedNodeList to an ArrayList in reverse order.
|
String |
toString() |
public final boolean isEmpty()
public final void addLast(T node)
public final void addFirst(T node)
public final T getHead()
public final T getTail()
public final void clear()
public final void addLast(LinkedNodeList<T> list)
public final void addFirst(LinkedNodeList<T> list)
public final T reparent(LinkedNodeList<T> list)
public final T rotate()
public final void rotateTo(T head)
public int size()
public final ArrayList<T> toArrayList()
public final ArrayList<T> toArrayListReversed()
public final T[] toArray(T[] array)
Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.