final class HashedPriorityQueue[T] extends AbstractQueue[T]
Implements a priority queue based on a heap. Like many priority queue
implementations, this provides logarithmic time for inserting elements
and removing the top element. However unlike many implementations,
this provides logarithmic rather than linear time for the random-access
contains and remove methods. The queue also provides a
mechanism for updating the heap after an element's priority has changed
via the priorityUpdated method instead of requiring the element
to be removed and re-inserted.
The queue is NOT thread-safe.
The iterator does NOT return elements in priority order.
- Alphabetic
- By Inheritance
- HashedPriorityQueue
- AbstractQueue
- Queue
- AbstractCollection
- Collection
- Iterable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
add(arg0: T): Boolean
- Definition Classes
- AbstractQueue → Queue → AbstractCollection → Collection
-
def
addAll(arg0: Collection[_ <: T]): Boolean
- Definition Classes
- AbstractQueue → AbstractCollection → Collection
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clear(): Unit
- Definition Classes
- HashedPriorityQueue → AbstractQueue → AbstractCollection → Collection
- Annotations
- @Override()
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
contains(obj: Any): Boolean
- Definition Classes
- HashedPriorityQueue → AbstractCollection → Collection
- Annotations
- @Override()
-
def
containsAll(arg0: Collection[_]): Boolean
- Definition Classes
- AbstractCollection → Collection
-
def
element(): T
- Definition Classes
- AbstractQueue → Queue
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
forEach(arg0: Consumer[_ >: T]): Unit
- Definition Classes
- Iterable
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
isEmpty(): Boolean
- Definition Classes
- AbstractCollection → Collection
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iterator(): Iterator[T]
NOTE: This iterator DOES NOT iterate elements in priority order.
NOTE: This iterator DOES NOT iterate elements in priority order.
- Definition Classes
- HashedPriorityQueue → AbstractCollection → Collection → Iterable
- Annotations
- @Override()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
offer(obj: T): Boolean
- Definition Classes
- HashedPriorityQueue → Queue
- Annotations
- @Override()
-
def
parallelStream(): Stream[T]
- Definition Classes
- Collection
-
def
peek(): T
- Definition Classes
- HashedPriorityQueue → Queue
- Annotations
- @Override()
-
def
poll(): T
- Definition Classes
- HashedPriorityQueue → Queue
- Annotations
- @Override()
-
def
priorityUpdated(obj: T): Unit
When an object in the heap changes priority, this must be called to restore proper ordering of the heap.
When an object in the heap changes priority, this must be called to restore proper ordering of the heap. After an object's priority changes, this method must be called before any elements are added or removed from the priority queue.
-
def
remove(o: Any): Boolean
- Definition Classes
- HashedPriorityQueue → AbstractCollection → Collection
- Annotations
- @SuppressWarnings() @Override()
-
def
remove(): T
- Definition Classes
- AbstractQueue → Queue
-
def
removeAll(arg0: Collection[_]): Boolean
- Definition Classes
- AbstractCollection → Collection
-
def
removeIf(arg0: Predicate[_ >: T]): Boolean
- Definition Classes
- Collection
-
def
retainAll(arg0: Collection[_]): Boolean
- Definition Classes
- AbstractCollection → Collection
-
def
size(): Int
- Definition Classes
- HashedPriorityQueue → AbstractCollection → Collection
- Annotations
- @Override()
-
def
spliterator(): Spliterator[T]
- Definition Classes
- Collection → Iterable
-
def
stream(): Stream[T]
- Definition Classes
- Collection
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toArray[T1](a: Array[T1]): Array[T1]
- Annotations
- @SuppressWarnings() @Override()
-
def
toArray(): Array[AnyRef]
- Definition Classes
- HashedPriorityQueue → AbstractCollection → Collection
- Annotations
- @Override()
-
def
toArray[T](arg0: IntFunction[Array[T]]): Array[T]
- Definition Classes
- Collection
-
def
toString(): String
- Definition Classes
- AbstractCollection → AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )