public final class EmptyPriorityQueue<T> extends java.lang.Object implements PriorityQueue<T>
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
add(T t) |
boolean |
addAll(java.util.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(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
containsTyped(T node)
Same as
Collection.contains(Object) but typed using generics. |
T |
element() |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
static <V> EmptyPriorityQueue<V> |
instance()
Returns an unmodifiable empty
PriorityQueue. |
boolean |
isEmpty() |
java.util.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(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeTyped(T node)
Same as
Collection.remove(Object) but typed using generics. |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.lang.Object[] |
toArray() |
<T1> T1[] |
toArray(T1[] a) |
java.lang.String |
toString() |
public static <V> EmptyPriorityQueue<V> instance()
PriorityQueue.public boolean removeTyped(T node)
PriorityQueueCollection.remove(Object) but typed using generics.removeTyped 在接口中 PriorityQueue<T>public boolean containsTyped(T node)
PriorityQueueCollection.contains(Object) but typed using generics.containsTyped 在接口中 PriorityQueue<T>public void priorityChanged(T node)
PriorityQueuenode has changed. The queue will adjust to ensure the priority
queue properties are maintained.priorityChanged 在接口中 PriorityQueue<T>node - An object which is in this queue and the priority may have changed.public int size()
size 在接口中 java.util.Collection<T>public boolean isEmpty()
isEmpty 在接口中 java.util.Collection<T>public boolean contains(java.lang.Object o)
contains 在接口中 java.util.Collection<T>public java.util.Iterator<T> iterator()
public java.lang.Object[] toArray()
toArray 在接口中 java.util.Collection<T>public <T1> T1[] toArray(T1[] a)
toArray 在接口中 java.util.Collection<T>public boolean remove(java.lang.Object o)
remove 在接口中 java.util.Collection<T>public boolean containsAll(java.util.Collection<?> c)
containsAll 在接口中 java.util.Collection<T>public boolean addAll(java.util.Collection<? extends T> c)
addAll 在接口中 java.util.Collection<T>public boolean removeAll(java.util.Collection<?> c)
removeAll 在接口中 java.util.Collection<T>public boolean retainAll(java.util.Collection<?> c)
retainAll 在接口中 java.util.Collection<T>public void clear()
clear 在接口中 java.util.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 在接口中 PriorityQueue<T>public boolean equals(java.lang.Object o)
equals 在接口中 java.util.Collection<T>equals 在类中 java.lang.Objectpublic int hashCode()
hashCode 在接口中 java.util.Collection<T>hashCode 在类中 java.lang.Objectpublic java.lang.String toString()
toString 在类中 java.lang.Object