public class LinkedQueue<E>
extends java.util.LinkedList<E>
LinkedList,
Queue,
Serialized Form| Constructor and Description |
|---|
LinkedQueue()
Creates an empty queue.
|
LinkedQueue(java.util.Collection<? extends E> c)
Constructs a queue containing the elements of the specified collection,
in the order they are returned by the collection's iterator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all of the elements from this queue
|
E |
element()
Retrieves, but does not remove, the head of this queue.
|
boolean |
offer(E o)
Inserts the specified element into the rear of this queue.
|
E |
peek()
Retrieves, but does not remove, the head of this queue,
returning null if this queue is empty.
|
E |
poll()
Retrieves and removes the head of this queue, or null
if this queue is empty.
|
E |
remove()
Retrieves and removes the head of this queue.
|
add, add, addAll, addAll, addFirst, addLast, clone, contains, descendingIterator, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offerFirst, offerLast, peekFirst, peekLast, pollFirst, pollLast, pop, push, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArraycontainsAll, isEmpty, removeAll, retainAll, toStringpublic LinkedQueue()
public LinkedQueue(java.util.Collection<? extends E> c)
c - the collection whose elements are to be placed into this queue.java.lang.NullPointerException - if the specified collection was null.public boolean offer(E o)
public E poll()
public E remove()
public E peek()
public E element()