Class/Object

scalaz

Dequeue

Related Docs: object Dequeue | package scalaz

Permalink

sealed abstract class Dequeue[A] extends AnyRef

A Double-ended queue, based on the Bankers Double Ended Queue as described by C. Okasaki in "Purely Functional Data Structures"

A queue that allows items to be put onto either the front (cons) or the back (snoc) of the queue in constant time, and constant time access to the element at the very front or the very back of the queue. Dequeueing an element from either end is constant time when amortized over a number of dequeues.

This queue maintains an invariant that whenever there are at least two elements in the queue, neither the front list nor back list are empty. In order to maintain this invariant, a dequeue from either side which would leave that side empty constructs the resulting queue by taking elements from the opposite side

Source
Dequeue.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Dequeue
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def backMaybe: Maybe[A]

    Permalink
  2. abstract def frontMaybe: Maybe[A]

    Permalink
  3. abstract def isEmpty: Boolean

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++(other: Dequeue[A]): Dequeue[A]

    Permalink

    Append another Dequeue to this dequeue

  4. def +:(a: A): Dequeue[A]

    Permalink

    alias for cons

  5. def :+(a: A): Dequeue[A]

    Permalink

    alias for snoc

  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def cons(a: A): Dequeue[A]

    Permalink

    enqueue to the front of the queue

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def foldLeft[B](b: B)(f: (B, A) ⇒ B): B

    Permalink
  14. def foldRight[B](b: B)(f: (A, B) ⇒ B): B

    Permalink
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def map[B](f: (A) ⇒ B): Dequeue[B]

    Permalink
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def reverse: Dequeue[A]

    Permalink
  23. def size: Int

    Permalink
  24. def snoc(a: A): Dequeue[A]

    Permalink

    enqueue on to the back of the queue

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toBackIList: IList[A]

    Permalink

    convert this queue to a list of elements from back to front

  27. def toBackStream: Stream[A]

    Permalink

    convert this queue to a stream of elements from back to front

  28. def toIList: IList[A]

    Permalink

    convert this queue to a list of elements from front to back

  29. def toStream: Stream[A]

    Permalink

    convert this queue to a stream of elements from front to back

  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. def uncons: Maybe[(A, Dequeue[A])]

    Permalink

    dequeue from the front of the queue

  32. def unsnoc: Maybe[(A, Dequeue[A])]

    Permalink

    dequeue from the back of the queue

  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped