public final class EmptyPriorityQueue<T> extends Object implements PriorityQueue<T>
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T t) |
boolean |
addAll(Collection<? extends T> c) |
void |
clear() |
void |
clearIgnoringIndexes()
Removes all of the elements from this
PriorityQueue without calling
PriorityQueueNode.priorityQueueIndex(DefaultPriorityQueue) or explicitly removing references to them to
allow them to be garbage collected. |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
containsTyped(T node)
Same as
Collection.contains(Object) but typed using generics. |
T |
element() |
boolean |
equals(Object o) |
int |
hashCode() |
static <V> EmptyPriorityQueue<V> |
instance()
Returns an unmodifiable empty
PriorityQueue. |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
boolean |
offer(T t) |
T |
peek() |
T |
poll() |
void |
priorityChanged(T node)
Notify the queue that the priority for
node has changed. |
T |
remove() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeTyped(T node)
Same as
Collection.remove(Object) but typed using generics. |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T1> T1[] |
toArray(T1[] a) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitparallelStream, removeIf, spliterator, streampublic static <V> EmptyPriorityQueue<V> instance()
PriorityQueue.public boolean removeTyped(T node)
PriorityQueueCollection.remove(Object) but typed using generics.removeTyped in interface PriorityQueue<T>public boolean containsTyped(T node)
PriorityQueueCollection.contains(Object) but typed using generics.containsTyped in interface PriorityQueue<T>public void priorityChanged(T node)
PriorityQueuenode has changed. The queue will adjust to ensure the priority
queue properties are maintained.priorityChanged in interface PriorityQueue<T>node - An object which is in this queue and the priority may have changed.public int size()
size in interface Collection<T>public boolean isEmpty()
isEmpty in interface Collection<T>public boolean contains(Object o)
contains in interface Collection<T>public Object[] toArray()
toArray in interface Collection<T>public <T1> T1[] toArray(T1[] a)
toArray in interface Collection<T>public boolean add(T t)
public boolean remove(Object o)
remove in interface Collection<T>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>public boolean addAll(Collection<? extends T> c)
addAll in interface Collection<T>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<T>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<T>public void clear()
clear in interface Collection<T>public void clearIgnoringIndexes()
PriorityQueuePriorityQueue without calling
PriorityQueueNode.priorityQueueIndex(DefaultPriorityQueue) or explicitly removing references to them to
allow them to be garbage collected. This should only be used when it is certain that the nodes will not be
re-inserted into this or any other PriorityQueue and it is known that the PriorityQueue itself
will be garbage collected after this call.clearIgnoringIndexes in interface PriorityQueue<T>public boolean equals(Object o)
equals in interface Collection<T>equals in class Objectpublic int hashCode()
hashCode in interface Collection<T>hashCode in class ObjectCopyright © 2008–2025 The Netty Project. All rights reserved.