Name
AbstractQueue<E>
Synopsis
This abstract class provides a framework for simple
Queue
implementations. A concrete subclass must
implement offer( )
, peek( )
,
and poll( )
and must also implement the inherited
size( )
and iterator( )
methods
of the Collection
interface. The
Iterator
returned by iterator(
)
must support the remove( )
operation.
Figure 16-4. java.util.AbstractQueue<E>
public abstract class AbstractQueue<E> extends AbstractCollection<E> implements Queue<E> { // Protected Constructors protected AbstractQueue( ); // Methods Implementing Collection public boolean add(E o); public boolean addAll(Collection<? extends E> c); public void clear( ); // Methods Implementing Queue public E element( ); public E remove( ); }
Subclasses
PriorityQueue
,
java.util.concurrent.ArrayBlockingQueue
,
java.util.concurrent.ConcurrentLinkedQueue
,
java.util.concurrent.DelayQueue
,
java.util.concurrent.LinkedBlockingQueue
,
java.util.concurrent.PriorityBlockingQueue
,
java.util.concurrent.SynchronousQueue
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.