|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractQueue<E>
E - the types of objects this queue can holdpublic abstract class AbstractQueue<E>
Abstract superclass for Queue implementations.
| Constructor Summary | |
|---|---|
protected |
AbstractQueue()
Default constructor. |
| Method Summary | |
|---|---|
boolean |
add(E object)
Adds the given object to the queue. |
boolean |
addAll(Collection<? extends E> collection)
Adds the objects from the given collection to the queue. |
void |
clear()
Removes all objects from this queue. |
E |
element()
Returns the head object of the queue. |
E |
remove()
Removes the head object from the queue. |
| Methods inherited from class java.util.AbstractCollection |
|---|
contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Queue |
|---|
offer, peek, poll |
| Methods inherited from interface java.util.Collection |
|---|
contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Constructor Detail |
|---|
protected AbstractQueue()
| Method Detail |
|---|
public boolean add(E object)
add in interface Collection<E>add in class AbstractCollection<E>object - the object to add
true
NullPointerException - if the object is null
IllegalStateException - if the object cannot be addedpublic boolean addAll(Collection<? extends E> collection)
addAll in interface Collection<E>addAll in class AbstractCollection<E>collection - the Collection of objects
true if the queue changed
NullPointerException - if the collection or any of it's objects are null
IllegalArgumentException - if the collection is this queuepublic void clear()
clear in interface Collection<E>clear in class AbstractCollection<E>AbstractCollection.isEmpty(),
AbstractCollection.size()public E element()
element in interface Queue<E>NoSuchElementException - if the queue is emptypublic E remove()
remove in interface Queue<E>NoSuchElementException - if the queue is empty
|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||