E
- the type of elements held in this queue
Serializable
, Iterable<E>
, Collection<E>
, Queue<E>
Constructors
Creates a
PriorityQueue
with the default initial capacity (11) that orders its elements according to their
natural ordering.
Creates a
PriorityQueue
with the specified initial capacity that orders its elements according to their
natural ordering.
Creates a PriorityQueue
with the specified initial capacity that orders its elements according to the specified comparator.
Creates a PriorityQueue
containing the elements in the specified collection.
Creates a PriorityQueue
with the default initial capacity and whose elements are ordered according to the specified comparator.
Creates a PriorityQueue
containing the elements in the specified priority queue.
Creates a PriorityQueue
containing the elements in the specified sorted set.
boolean
Inserts the specified element into this priority queue.
void
Removes all of the elements from this priority queue.
Returns the comparator used to order the elements in this queue, or
null
if this queue is sorted according to the
natural orderingof its elements.
boolean
Returns true
if this queue contains the specified element.
void
Performs the given action for each element of the Iterable
until all elements have been processed or the action throws an exception.
Returns an iterator over the elements in this queue.
boolean
Inserts the specified element into this priority queue.
Retrieves, but does not remove, the head of this queue, or returns null
if this queue is empty.
Retrieves and removes the head of this queue, or returns null
if this queue is empty.
boolean
Removes a single instance of the specified element from this queue, if it is present.
boolean
Removes all of this collection's elements that are also contained in the specified collection (optional operation).
boolean
Removes all of the elements of this collection that satisfy the given predicate (optional operation).
boolean
Retains only the elements in this collection that are contained in the specified collection (optional operation).
int
Returns the number of elements in this collection.
Returns an array containing all of the elements in this queue.
<T> T[]
Returns an array containing all of the elements in this queue; the runtime type of the returned array is that of the specified array.
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