Packages

sealed abstract class ==>>[A, B] extends AnyRef

An immutable map of key/value pairs implemented as a balanced binary tree

Based on Haskell's Data.Map

Source
Map.scala
Since

7.0.3

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ==>>
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract val size: Int

    number of key/value pairs - O(1)

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(a: (A, B))(implicit o: Order[A]): ==>>[A, B]

    tupled form of insert

  4. def -(k: A)(implicit o: Order[A]): ==>>[A, B]

    alias for delete

  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def \\[C](other: ==>>[A, C])(implicit o: Order[A]): ==>>[A, B]
  7. def adjust(k: A, f: (B) => B)(implicit o: Order[A]): ==>>[A, B]

    if the key exists, transforms its value - O(log n)

  8. def adjustWithKey(k: A, f: (A, B) => B)(implicit o: Order[A]): ==>>[A, B]

    like adjust but with the key available in the transformation - O(log n)

  9. def alter(k: A, f: (Maybe[B]) => Maybe[B])(implicit o: Order[A]): ==>>[A, B]
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. def delete(k: A)(implicit n: Order[A]): ==>>[A, B]

    removes a key/value pair - O(log n)

  13. def deleteAt(i: Int): ==>>[A, B]
  14. def deleteMax: ==>>[A, B]
  15. def deleteMin: ==>>[A, B]
  16. def difference[C](other: ==>>[A, C])(implicit o: Order[A]): ==>>[A, B]
  17. def differenceWith[C](other: ==>>[A, C])(f: (B, C) => Maybe[B])(implicit o: Order[A]): ==>>[A, B]
  18. def differenceWithKey[C](other: ==>>[A, C])(f: (A, B, C) => Maybe[B])(implicit o: Order[A]): ==>>[A, B]
  19. final def elemAt(i: Int): Maybe[(A, B)]
    Annotations
    @tailrec()
  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def equals(other: Any): Boolean
    Definition Classes
    ==>> → AnyRef → Any
  22. def filter(p: (B) => Boolean)(implicit o: Order[A]): ==>>[A, B]
  23. def filterM[F[_]](f: (B) => F[Boolean])(implicit F: Applicative[F], O: Order[A]): F[==>>[A, B]]
  24. def filterWithKey(p: (A, B) => Boolean)(implicit o: Order[A]): ==>>[A, B]
  25. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  26. final def findMax: Maybe[(A, B)]
    Annotations
    @tailrec()
  27. final def findMin: Maybe[(A, B)]
    Annotations
    @tailrec()
  28. def fold[C](z: C)(f: (A, B, C) => C): C
  29. def foldMapWithKey[C](f: (A, B) => C)(implicit F: Monoid[C]): C
  30. def foldlWithKey[C](z: C)(f: (C, A, B) => C): C
  31. def foldrWithKey[C](z: C)(f: (A, B, C) => C): C
  32. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  33. final def hashCode(): Int
    Definition Classes
    ==>> → AnyRef → Any
  34. def insert(kx: A, x: B)(implicit n: Order[A]): ==>>[A, B]

    inserts a new key/value - O(log n).

    inserts a new key/value - O(log n).

    If the key is already present, its value is replaced by the provided value.

  35. def insertWith(f: (B, B) => B, kx: A, x: B)(implicit o: Order[A]): ==>>[A, B]

    inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)

    inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)

    f

    function to resolve conflict with existing key: (insertedValue, existingValue) => resolvedValue

    kx

    key

    x

    value to insert if the key is not already present

  36. def insertWithKey(f: (A, B, B) => B, kx: A, x: B)(implicit o: Order[A]): ==>>[A, B]

    inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)

    inserts a new key/value pair, resolving the conflict if the key already exists - O(log n)

    f

    function to resolve conflict with existing key: (key, insertedValue, existingValue) => resolvedValue

    kx

    key

    x

    value to insert if the key is not already present

  37. def intersection[C](other: ==>>[A, C])(implicit o: Order[A]): ==>>[A, B]
  38. def intersectionWith[C, D](other: ==>>[A, C])(f: (B, C) => D)(implicit o: Order[A]): ==>>[A, D]
  39. def intersectionWithKey[C, D](other: ==>>[A, C])(f: (A, B, C) => D)(implicit o: Order[A]): ==>>[A, D]
  40. def isEmpty: Boolean

    returns true if this map contains no key/value pairs - O(1)

  41. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  42. def isSubmapOf(a: ==>>[A, B])(implicit o: Order[A], e: Equal[B]): Boolean
  43. def isSubmapOfBy(a: ==>>[A, B], f: (B, B) => Boolean)(implicit o: Order[A]): Boolean
  44. def keySet: ISet[A]
  45. def keys: IList[A]
  46. final def lookup(k: A)(implicit n: Order[A]): Maybe[B]
    Annotations
    @tailrec()
  47. final def lookupAssoc(k: A)(implicit n: Order[A]): Maybe[(A, B)]
    Annotations
    @tailrec()
  48. final def lookupGE(k: A)(implicit o: Order[A]): Maybe[(A, B)]
    Annotations
    @tailrec()
  49. final def lookupGT(k: A)(implicit o: Order[A]): Maybe[(A, B)]
    Annotations
    @tailrec()
  50. def lookupIndex(k: A)(implicit o: Order[A]): Maybe[Int]
  51. final def lookupLE(k: A)(implicit o: Order[A]): Maybe[(A, B)]
    Annotations
    @tailrec()
  52. final def lookupLT(k: A)(implicit o: Order[A]): Maybe[(A, B)]
    Annotations
    @tailrec()
  53. def map[C](f: (B) => C): ==>>[A, C]
  54. def mapAccum[C](z: C)(f: (C, B) => (C, B)): (C, ==>>[A, B])
  55. def mapAccumL[C](a: C)(f: (C, A, B) => (C, B)): (C, ==>>[A, B])
  56. def mapAccumWithKey[C](z: C)(f: (C, A, B) => (C, B)): (C, ==>>[A, B])
  57. def mapEither[C, D](f: (B) => \/[C, D])(implicit o: Order[A]): (==>>[A, C], ==>>[A, D])
  58. def mapEitherWithKey[C, D](f: (A, B) => \/[C, D])(implicit o: Order[A]): (==>>[A, C], ==>>[A, D])
  59. def mapKeys[C](f: (A) => C)(implicit o: Order[C]): ==>>[C, B]
  60. def mapKeysWith[C](f: (A) => C, f2: (B, B) => B)(implicit o: Order[C]): ==>>[C, B]
  61. def mapMaybe[C](f: (B) => Maybe[C])(implicit o: Order[A]): ==>>[A, C]
  62. def mapMaybeWithKey[C](f: (A, B) => Maybe[C])(implicit o: Order[A]): ==>>[A, C]
  63. def mapWithKey[C](f: (A, B) => C): ==>>[A, C]
  64. def maxView: Maybe[(B, ==>>[A, B])]
  65. def maxViewWithKey: Maybe[((A, B), ==>>[A, B])]
  66. def member(k: A)(implicit n: Order[A]): Boolean
  67. def merge(other: ==>>[A, B]): ==>>[A, B]
    Attributes
    protected
  68. def minView: Maybe[(B, ==>>[A, B])]
  69. def minViewWithKey: Maybe[((A, B), ==>>[A, B])]
  70. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  71. def notMember(k: A)(implicit n: Order[A]): Boolean
  72. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  73. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  74. def partition(p: (B) => Boolean)(implicit o: Order[A]): (==>>[A, B], ==>>[A, B])
  75. def partitionWithKey(p: (A, B) => Boolean)(implicit o: Order[A]): (==>>[A, B], ==>>[A, B])
  76. def split(k: A)(implicit o: Order[A]): (==>>[A, B], ==>>[A, B])
  77. def splitLookup(k: A)(implicit o: Order[A]): (==>>[A, B], Maybe[B], ==>>[A, B])
  78. def splitLookupWithKey(k: A)(implicit o: Order[A]): (==>>[A, B], Maybe[(A, B)], ==>>[A, B])
  79. def splitRoot: IList[==>>[A, B]]
  80. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  81. def toAscIList: IList[(A, B)]
  82. def toAscList: List[(A, B)]
  83. def toDescIList: IList[(A, B)]
  84. def toDescList: List[(A, B)]
  85. def toIList: IList[(A, B)]
  86. def toList: List[(A, B)]
  87. def toString(): String
    Definition Classes
    AnyRef → Any
  88. def traverseWithKey[F[_], C](f: (A, B) => F[C])(implicit G: Applicative[F]): F[==>>[A, C]]
  89. def union(other: ==>>[A, B])(implicit k: Order[A]): ==>>[A, B]
  90. def unionWith(other: ==>>[A, B])(f: (B, B) => B)(implicit o: Order[A]): ==>>[A, B]
  91. def unionWithKey(other: ==>>[A, B])(f: (A, B, B) => B)(implicit o: Order[A]): ==>>[A, B]
  92. def update(k: A, f: (B) => Maybe[B])(implicit o: Order[A]): ==>>[A, B]

    updates or removes a value - O(log n)

    updates or removes a value - O(log n)

    if f returns None, then the key is removed from the map

  93. def updateAppend(k: A, v: B)(implicit o: Order[A], bsg: Semigroup[B]): ==>>[A, B]

    insert v into the map at k.

    insert v into the map at k. If there is already a value for k, append to the existing value using the Semigroup

  94. def updateAt(i: Int, f: (A, B) => Maybe[B]): ==>>[A, B]
  95. def updateLookupWithKey(k: A, f: (A, B) => Maybe[B])(implicit o: Order[A]): (Maybe[B], ==>>[A, B])

    looks up a key and updates its value - O(log n)

    looks up a key and updates its value - O(log n)

    Similar to updateWithKey but also returns the value. If the value was updated, returns the new value. If the value was deleted, returns the old value.

  96. def updateMax(f: (B) => Maybe[B]): ==>>[A, B]
  97. def updateMaxWithKey(f: (A, B) => Maybe[B]): ==>>[A, B]
  98. def updateMin(f: (B) => Maybe[B]): ==>>[A, B]
  99. def updateMinWithKey(f: (A, B) => Maybe[B]): ==>>[A, B]
  100. def updateWithKey(k: A, f: (A, B) => Maybe[B])(implicit o: Order[A]): ==>>[A, B]

    like update but with the key available in the update function - O(log n)

  101. def values: IList[B]
  102. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  103. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  104. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped