AbstractQueue (Java SE 25 & JDK 25)
- 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
-
Constructor Summary
Constructors
protectedConstructor for use by subclasses.
-
Method Summary
booleanInserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning
trueupon success and throwing anIllegalStateExceptionif no space is currently available.booleanAdds all of the elements in the specified collection to this queue.
voidclear()Removes all of the elements from this queue.
element()Retrieves, but does not remove, the head of this queue.
remove()Retrieves and removes the head of this queue.
Methods declared in interface Collection
contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
Constructor Details
-
AbstractQueue
-
-
Method Details
-
add
-
remove
-
element
-
clear
-
addAll
-