Package io.netty.util.internal
Class EmptyPriorityQueue<T>
- java.lang.Object
-
- io.netty.util.internal.EmptyPriorityQueue<T>
-
- All Implemented Interfaces:
PriorityQueue<T>,java.lang.Iterable<T>,java.util.Collection<T>,java.util.Queue<T>
public final class EmptyPriorityQueue<T> extends java.lang.Object implements PriorityQueue<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T t)booleanaddAll(java.util.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(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)booleancontainsTyped(T node)Same asCollection.contains(Object)but typed using generics.Telement()booleanequals(java.lang.Object o)inthashCode()static <V> EmptyPriorityQueue<V>instance()Returns an unmodifiable emptyPriorityQueue.booleanisEmpty()java.util.Iterator<T>iterator()booleanoffer(T t)Tpeek()Tpoll()voidpriorityChanged(T node)Notify the queue that the priority fornodehas changed.Tremove()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanremoveTyped(T node)Same asCollection.remove(Object)but typed using generics.booleanretainAll(java.util.Collection<?> c)intsize()java.lang.Object[]toArray()<T1> T1[]toArray(T1[] a)java.lang.StringtoString()
-
-
-
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 interfacejava.util.Collection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<T>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<T>
-
iterator
public java.util.Iterator<T> iterator()
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<T>
-
toArray
public <T1> T1[] toArray(T1[] a)
- Specified by:
toArrayin interfacejava.util.Collection<T>
-
add
public boolean add(T t)
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<T>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAllin interfacejava.util.Collection<T>
-
addAll
public boolean addAll(java.util.Collection<? extends T> c)
- Specified by:
addAllin interfacejava.util.Collection<T>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<T>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<T>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<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(java.lang.Object o)
- Specified by:
equalsin interfacejava.util.Collection<T>- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<T>- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-