class CircularQueue[A] extends AnyRef
The CircularQueue
provides a circular queue that can be used to store the
latest 'cap' elements.
- Alphabetic
- By Inheritance
- CircularQueue
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CircularQueue(cap: Int)(implicit arg0: ClassTag[A])
- cap
the capacity or maximum number of elements that can be stored
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +=(elem: A): CircularQueue.this.type
Add element 'elem' to the front of 'this' circular queue, overwriting the oldest element when queue is full.
Add element 'elem' to the front of 'this' circular queue, overwriting the oldest element when queue is full.
- elem
the element to add
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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 dequeue(): A
Remove the oldest element from the rear of 'this' circular queue, throwing an exception when the queue is empty
- def dequeueOrNull(): A
Remove the oldest element from the rear of 'this' circular queue, returning null when the queue is empty.
- def enqueue(elem: A): CircularQueue.this.type
Add element 'elem' to the front of 'this' circular queue, throwing an exeception when the queue is full.
Add element 'elem' to the front of 'this' circular queue, throwing an exeception when the queue is full.
- elem
the element to add
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def isEmpty: Boolean
Return whether the queue is empty (i.e., has no element).
- def isFull: Boolean
Return whether the queue is full (i.e., no space left for new elements).
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newBuilder: Builder[A, CircularQueue[A]]
FIX - TBD
FIX - TBD
- Attributes
- protected[this]
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def size: Int
Return the current size of the queue (number of elements contained).
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
Convert 'this' circular queue into a string.
Convert 'this' circular queue into a string. FIX - also print empty slot
- Definition Classes
- CircularQueue → 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])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated