class SynchronizedPeanoTreeQueue[V] extends PeanoQueue[Long, V]
A thread-safe PeanoTreeQueue thanks to synchronizing all methods
- Alphabetic
- By Inheritance
- SynchronizedPeanoTreeQueue
- PeanoQueue
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 alreadyInserted(key: Long): Boolean
Whether the key
key
has already beeninsert
-ed to the PeanoQueue.Whether the key
key
has already beeninsert
-ed to the PeanoQueue. All values below the PeanoQueue.front are considered to have been inserted to the PeanoQueue, even if they are below the initial PeanoQueue.head.- Definition Classes
- SynchronizedPeanoTreeQueue → PeanoQueue
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def dropUntilFront(): Option[(Long, V)]
Drops all elements from the PeanoQueue below the front and sets head to front.
Drops all elements from the PeanoQueue below the front and sets head to front.
- returns
scala.None$ if the head already was at the front or the value associated with the last value before head otherwise.
- Definition Classes
- PeanoQueue
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def front: Long
Returns the front of the PeanoQueue.
Returns the front of the PeanoQueue.
The front is defined as the least key that is at least PeanoQueue.head and that has not yet been inserted into the PeanoQueue.
- Definition Classes
- SynchronizedPeanoTreeQueue → PeanoQueue
- def get(key: Long): AssociatedValue[V]
Returns the value associated with the given
key
.Returns the value associated with the given
key
.- Definition Classes
- SynchronizedPeanoTreeQueue → PeanoQueue
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def head: Long
Returns the head of the PeanoQueue.
Returns the head of the PeanoQueue.
The head denotes the next key to be pulled. The head key need not yet have been inserted into the PeanoQueue.
- Definition Classes
- SynchronizedPeanoTreeQueue → PeanoQueue
- def insert(key: Long, value: V): Boolean
Inserts the key-value pair
(key, value)
to the PeanoQueue.Inserts the key-value pair
(key, value)
to the PeanoQueue. This may change the value for PeanoQueue.frontInserting a key-value pair is idempotent. If the keys are bounded from above, then the maximal value must not be inserted.
- key
The key to be inserted. If the key has been added previously, then the following applies:
- If the key is below PeanoQueue.head, then this insert operation has no effect.
- If the key is at least PeanoQueue.head and the value is the same, this operation has no effect.
- If the key is at least PeanoQueue.head and the value is different, then the PeanoQueue is not changed and an java.lang.IllegalArgumentException is thrown.
- value
The value associated with the key.
- returns
whether the key is at least PeanoQueue.head
- Definition Classes
- SynchronizedPeanoTreeQueue → PeanoQueue
- Exceptions thrown
java.lang.IllegalArgumentException
if the keys are bounded from above andkey
is the maximal value, or if thekey
is above PeanoQueue.head and has been added with a different value.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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 poll(): Option[(Long, V)]
Returns and drops the key at PeanoQueue.head and its associated value, if present.
Returns and drops the key at PeanoQueue.head and its associated value, if present. If so, this also increments PeanoQueue.head. Returns scala.None to indicate that the key PeanoQueue.head has not yet been inserted.
- Definition Classes
- SynchronizedPeanoTreeQueue → PeanoQueue
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])