- java.lang.Object
-
- io.netty5.util.internal.EmptyPriorityQueue<T>
-
- All Implemented Interfaces:
PriorityQueue<T>,Iterable<T>,Collection<T>,Queue<T>
public final class EmptyPriorityQueue<T> extends Object implements PriorityQueue<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T t)booleanaddAll(Collection<? extends T> c)voidclear()voidclearIgnoringIndexes()Removes all of the elements from thisPriorityQueuewithout callingPriorityQueueNode.priorityQueueIndex(DefaultPriorityQueue)or explicitly removing references to them to allow them to be garbage collected.booleancontains(Object o)booleancontainsAll(Collection<?> c)booleancontainsTyped(T node)Same asCollection.contains(Object)but typed using generics.Telement()booleanequals(Object o)inthashCode()static <V> EmptyPriorityQueue<V>instance()Returns an unmodifiable emptyPriorityQueue.booleanisEmpty()Iterator<T>iterator()booleanoffer(T t)Tpeek()Tpoll()voidpriorityChanged(T node)Notify the queue that the priority fornodehas changed.Tremove()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanremoveTyped(T node)Same asCollection.remove(Object)but typed using generics.booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T1> T1[]toArray(T1[] a)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Method Detail
-
instance
public static <V> EmptyPriorityQueue<V> instance()
Returns an unmodifiable emptyPriorityQueue.
-
removeTyped
public boolean removeTyped(T node)
Description copied from interface:PriorityQueueSame asCollection.remove(Object)but typed using generics.- Specified by:
removeTypedin interfacePriorityQueue<T>
-
containsTyped
public boolean containsTyped(T node)
Description copied from interface:PriorityQueueSame asCollection.contains(Object)but typed using generics.- Specified by:
containsTypedin interfacePriorityQueue<T>
-
priorityChanged
public void priorityChanged(T node)
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
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T>
-
toArray
public <T1> T1[] toArray(T1[] a)
- Specified by:
toArrayin interfaceCollection<T>
-
add
public boolean add(T t)
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> c)
- 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
public boolean equals(Object o)
- Specified by:
equalsin interfaceCollection<T>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<T>- Overrides:
hashCodein classObject
-
-