Class EmptyPriorityQueue<T>
java.lang.Object
io.netty.util.internal.EmptyPriorityQueue<T>
- All Implemented Interfaces:
PriorityQueue<T>, Iterable<T>, Collection<T>, Queue<T>
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends T> c) voidclear()voidRemoves all of the elements from thisPriorityQueuewithout callingPriorityQueueNode.priorityQueueIndex(DefaultPriorityQueue)or explicitly removing references to them to allow them to be garbage collected.booleanbooleancontainsAll(Collection<?> c) booleancontainsTyped(T node) Same asCollection.contains(Object)but typed using generics.element()booleaninthashCode()static <V> EmptyPriorityQueue<V> instance()Returns an unmodifiable emptyPriorityQueue.booleanisEmpty()iterator()booleanpeek()poll()voidpriorityChanged(T node) Notify the queue that the priority fornodehas changed.remove()booleanbooleanremoveAll(Collection<?> c) booleanremoveTyped(T node) Same asCollection.remove(Object)but typed using generics.booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T1> T1[]toArray(T1[] a) toString()Methods inherited from interface Collection
parallelStream, removeIf, spliterator, stream
-
Method Details
-
instance
Returns an unmodifiable emptyPriorityQueue. -
removeTyped
Description copied from interface:PriorityQueueSame asCollection.remove(Object)but typed using generics.- Specified by:
removeTypedin interfacePriorityQueue<T>
-
containsTyped
Description copied from interface:PriorityQueueSame asCollection.contains(Object)but typed using generics.- Specified by:
containsTypedin interfacePriorityQueue<T>
-
priorityChanged
Description copied from interface:PriorityQueueNotify the queue that the priority fornodehas changed. The queue will adjust to ensure the priority queue properties are maintained.- Specified by:
priorityChangedin interfacePriorityQueue<T>- Parameters:
node- An object which is in this queue and the priority may have changed.
-
size
public int size()- Specified by:
sizein interfaceCollection<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T>
-
contains
- Specified by:
containsin interfaceCollection<T>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<T>
-
toArray
public <T1> T1[] toArray(T1[] a) - Specified by:
toArrayin interfaceCollection<T>
-
add
-
remove
- Specified by:
removein interfaceCollection<T>
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>
-
addAll
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T>
-
clearIgnoringIndexes
public void clearIgnoringIndexes()Description copied from interface:PriorityQueueRemoves all of the elements from thisPriorityQueuewithout callingPriorityQueueNode.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 otherPriorityQueueand it is known that thePriorityQueueitself will be garbage collected after this call.- Specified by:
clearIgnoringIndexesin interfacePriorityQueue<T>
-
equals
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<T>- Overrides:
hashCodein classObject
-
offer
-
remove
-
poll
-
element
-
peek
-
toString
-