|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Queue<T>
Interface representing a first-in, first-out (FIFO) queue when unsorted, and a priority queue when sorted.
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 |
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 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 |
Method Detail |
---|
void enqueue(T item)
item
- The item to add to the queue.T dequeue()
remove(getLength() - 1, 1);
T peek()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |