|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.collections.LinkedList<T>
pivot.collections.LinkedQueue<T>
public class LinkedQueue<T>
Implementation of the Queue
interface that is backed by a linked
list.
TODO This class is currently incomplete.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pivot.collections.List |
---|
List.ListListenerList<T> |
Nested classes/interfaces inherited from interface pivot.collections.Sequence |
---|
Sequence.Search, Sequence.Sort, Sequence.Tree |
Constructor Summary | |
---|---|
LinkedQueue()
|
Method Summary | |
---|---|
T |
dequeue()
Removes the item from the head of the queue and returns it. |
void |
enqueue(T item)
Enqueues an item. |
T |
peek()
Returns the item at the head of the queue without removing it from the queue. |
Methods inherited from class pivot.collections.LinkedList |
---|
add, clear, get, getComparator, getLength, getListListeners, indexOf, insert, iterator, remove, remove, setComparator, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface pivot.collections.List |
---|
add, clear, getLength, getListListeners, insert, remove, setComparator, update |
Methods inherited from interface pivot.collections.Sequence |
---|
get, indexOf, remove |
Methods inherited from interface pivot.collections.Collection |
---|
getComparator |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Constructor Detail |
---|
public LinkedQueue()
Method Detail |
---|
public void enqueue(T item)
Queue
enqueue
in interface Queue<T>
item
- The item to add to the queue.public T dequeue()
Queue
remove(getLength() - 1, 1);
dequeue
in interface Queue<T>
public T peek()
Queue
peek
in interface Queue<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |