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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected volatile T extends LinkedNode<T> head
protected volatile int size
public boolean isEmpty()
public void addLast(T node)
public void addFirst(T node)
public T getHead()
public T getTail()
public void clear()
public void addLast(LinkedNodeList<T> list)
public void addFirst(LinkedNodeList<T> list)
public T reparent(LinkedNodeList<T> list)
public T rotate()
public void rotateTo(T head)
public int size()
public ArrayList<T> toArrayList()
public T[] toArray(T[] array)
public ArrayList<T> toArrayListReversed()
Copyright © 2009–2016 FuseSource, Corp.. All rights reserved.