A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/AbstractQueue.html below:

AbstractQueue (Java SE 20 & JDK 20)

Type Parameters:
E - the type of elements held in this queue
All Implemented Interfaces:
Iterable<E>, Collection<E>, Queue<E>
Direct Known Subclasses:
ArrayBlockingQueue, ConcurrentLinkedQueue, DelayQueue, LinkedBlockingDeque, LinkedBlockingQueue, LinkedTransferQueue, PriorityBlockingQueue, PriorityQueue, SynchronousQueue

This class provides skeletal implementations of some

Queue

operations. The implementations in this class are appropriate when the base implementation does

not

allow

null

elements. Methods

add

,

remove

, and

element

are based on

offer

,

poll

, and

peek

, respectively, but throw exceptions instead of indicating failure via

false

or

null

returns.

A Queue implementation that extends this class must minimally define a method Queue.offer(E) which does not permit insertion of null elements, along with methods Queue.peek(), Queue.poll(), Collection.size(), and Collection.iterator(). Typically, additional methods will be overridden as well. If these requirements cannot be met, consider instead subclassing AbstractCollection.

This class is a member of the Java Collections Framework.

Since:
1.5

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4