- 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 boolean
add(T t)
boolean
addAll(Collection<? extends T> c)
void
clear()
void
clearIgnoringIndexes()
Removes all of the elements from thisPriorityQueue
without callingPriorityQueueNode.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 asCollection.contains(Object)
but typed using generics.T
element()
boolean
equals(Object o)
int
hashCode()
static <V> EmptyPriorityQueue<V>
instance()
Returns an unmodifiable emptyPriorityQueue
.boolean
isEmpty()
Iterator<T>
iterator()
boolean
offer(T t)
T
peek()
T
poll()
void
priorityChanged(T node)
Notify the queue that the priority fornode
has changed.T
remove()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
removeTyped(T node)
Same asCollection.remove(Object)
but typed using generics.boolean
retainAll(Collection<?> c)
int
size()
Object[]
toArray()
<T1> T1[]
toArray(T1[] a)
String
toString()
-
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:PriorityQueue
Same asCollection.remove(Object)
but typed using generics.- Specified by:
removeTyped
in interfacePriorityQueue<T>
-
containsTyped
public boolean containsTyped(T node)
Description copied from interface:PriorityQueue
Same asCollection.contains(Object)
but typed using generics.- Specified by:
containsTyped
in interfacePriorityQueue<T>
-
priorityChanged
public void priorityChanged(T node)
Description copied from interface:PriorityQueue
Notify the queue that the priority fornode
has changed. The queue will adjust to ensure the priority queue properties are maintained.- Specified by:
priorityChanged
in interfacePriorityQueue<T>
- Parameters:
node
- An object which is in this queue and the priority may have changed.
-
size
public int size()
- Specified by:
size
in interfaceCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<T>
-
toArray
public <T1> T1[] toArray(T1[] a)
- Specified by:
toArray
in interfaceCollection<T>
-
add
public boolean add(T t)
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<T>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAll
in interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<T>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T>
-
clearIgnoringIndexes
public void clearIgnoringIndexes()
Description copied from interface:PriorityQueue
Removes all of the elements from thisPriorityQueue
without 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 otherPriorityQueue
and it is known that thePriorityQueue
itself will be garbage collected after this call.- Specified by:
clearIgnoringIndexes
in interfacePriorityQueue<T>
-
equals
public boolean equals(Object o)
- Specified by:
equals
in interfaceCollection<T>
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<T>
- Overrides:
hashCode
in classObject
-
-