scala.collection

MapProxy

trait MapProxy[A, +B] extends Map[A, B] with MapProxyLike[A, B, Map[A, B]]

This is a simple wrapper class for scala.collection.Map. It is most useful for assembling customized map abstractions dynamically using object composition and forwarding.

Inherits

  1. MapProxyLike
  2. IterableProxyLike
  3. TraversableProxyLike
  4. Proxy
  5. Map
  6. MapLike
  7. Subtractable
  8. PartialFunction
  9. Function1
  10. Iterable
  11. IterableLike
  12. Equals
  13. Traversable
  14. GenericTraversableTemplate
  15. TraversableLike
  16. HasNewBuilder
  17. AnyRef
  18. Any

Type Members

  1. class WithFilter extends AnyRef

    A class supporting filtered operations

Value Members

  1. def +[B1 >: B](kv1: (A, B1), kv2: (A, B1), kvs: (A, B1)*): Map[A, B1]

    Adds key/value pairs to this map, returning a new map

  2. def +[B1 >: B](kv: (A, B1)): Map[A, B1]

    Adds a key/value pair to this map, returning a new map

  3. def ++[B >: (A, B), That](that: Iterator[B])(bf: CanBuildFrom[Map[A, B], B, That]): That

    Concatenates this map with the elements of an iterator

  4. def ++[B >: (A, B), That](that: Traversable[B])(bf: CanBuildFrom[Map[A, B], B, That]): That

    Concatenates this map with the elements of a traversable collection

  5. def ++[B1 >: B](iter: Iterator[(A, B1)]): Map[A, B1]

    Adds all key/value pairs produced by an iterator to this map, returning a new map

  6. def ++[B1 >: B](kvs: Traversable[(A, B1)]): Map[A, B1]

    Adds all key/value pairs in a traversable collection to this map, returning a new map

  7. def -(elem1: A, elem2: A, elems: A*): Map[A, B]

    Creates a new map from this map with some elements removed

  8. def -(key: A): Map[A, B]

    Removes a key from this map, returning a new map

  9. def --(iter: Iterator[A]): Map[A, B]

    Creates a new map from this map by removing all elements produced by an iterator

  10. def --(elems: Traversable[A]): Map[A, B]

    Creates a new map from this map by removing all elements of another collection

  11. def /:[B](z: B)(op: (B, (A, B)) ⇒ B): B

    Applies a binary operator to a start value and all elements of this map, going left to right

  12. def :\[B](z: B)(op: ((A, B), B) ⇒ B): B

    Applies a binary operator to all elements of this map and a start value, going right to left

  13. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Appends all elements of this map to a string builder using start, end, and separator strings

  14. def addString(b: StringBuilder): StringBuilder

    Appends all elements of this map to a string builder

  15. def addString(b: StringBuilder, sep: String): StringBuilder

    Appends all elements of this map to a string builder using a separator string

  16. def andThen[C](k: (B) ⇒ C): PartialFunction[A, C]

    Composes this partial function with a transformation function that gets applied to results of this partial function

  17. def apply(key: A): B

    Retrieves the value which is associated with the given key

  18. def canEqual(that: Any): Boolean

    Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind

  19. def companion: GenericCompanion[Iterable[A][A]]

    The factory companion object that builds instances of class Map

  20. def compose[A](g: (A) ⇒ A): (A) ⇒ B

    (f compose g)(x) == f(g(x))

  21. def contains(key: A): Boolean

    Tests whether this map contains a binding for a key

  22. def copyToArray[B >: (A, B)](xs: Array[B], start: Int): Unit

    Copies elements of this map to an array

  23. def copyToArray[B >: (A, B)](xs: Array[B], start: Int, len: Int): Unit

    Copies elements of this map to an array

  24. def copyToArray[B >: (A, B)](xs: Array[B]): Unit

    Copies elements of this map to an array

  25. def copyToBuffer[B >: (A, B)](dest: Buffer[B]): Unit

    Copies all elements of this map to a buffer

  26. def count(p: ((A, B)) ⇒ Boolean): Int

    Counts the number of elements in the map which satisfy a predicate

  27. def default(key: A): B

    Defines the default value computation for the map, returned when a key is not found The method implemented here throws an exception, but it might be overridden in subclasses

  28. def drop(n: Int): Map[A, B]

    Selects all elements except first n ones

  29. def dropRight(n: Int): Map[A, B]

    Selects all elements except first n ones

  30. def dropWhile(p: ((A, B)) ⇒ Boolean): Map[A, B]

    Drops longest prefix of elements that satisfy a predicate

  31. def elements: Iterator[(A, B)]

  32. def empty: Map[A, B]

  33. def equals(that: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

  34. def exists(p: ((A, B)) ⇒ Boolean): Boolean

    Tests whether a predicate holds for some of the elements of this map

  35. def filter(p: ((A, B)) ⇒ Boolean): Map[A, B]

    Selects all elements of this map which satisfy a predicate

  36. def filterKeys(p: (A) ⇒ Boolean): DefaultMap[A, B]

    Filters this map by retaining only keys satisfying a predicate

  37. def filterNot(p: ((A, B)) ⇒ Boolean): Map[A, B]

    Selects all elements of this map which do not satisfy a predicate

  38. def find(p: ((A, B)) ⇒ Boolean): Option[(A, B)]

    Finds the first element of the map satisfying a predicate, if any

  39. def first: (A, B)

  40. def firstOption: Option[(A, B)]

    None if iterable is empty

  41. def flatMap[B, That](f: ((A, B)) ⇒ Traversable[B])(bf: CanBuildFrom[Map[A, B], B, That]): That

    Builds a new collection by applying a function to all elements of this map and concatenating the results

  42. def flatten[B](asTraversable: ((A, B)) ⇒ Traversable[B]): Iterable[B]

    Converts this map of traversable collections into a map in which all element collections are concatenated

  43. def foldLeft[B](z: B)(op: (B, (A, B)) ⇒ B): B

    Applies a binary operator to a start value and all elements of this map, going left to right

  44. def foldRight[B](z: B)(op: ((A, B), B) ⇒ B): B

    Applies a binary operator to all elements of this map and a start value, going right to left

  45. def forall(p: ((A, B)) ⇒ Boolean): Boolean

    Tests whether a predicate holds for all elements of this map

  46. def foreach[U](f: ((A, B)) ⇒ U): Unit

    Applies a function f to all elements of this map

  47. def genericBuilder[B]: Builder[B, Iterable[B]]

    The generic builder that builds instances of Map at arbitrary element types

  48. def get(key: A): Option[B]

    Optionally returns the value associated with a key

  49. def getOrElse[B1 >: B](key: A, default: ⇒ B1): B1

    Returns the value associated with a key, or a default value if the key is not contained in the map

  50. def groupBy[K](f: ((A, B)) ⇒ K): Map[K, Map[A, B]]

    Partitions this map into a map of maps according to some discriminator function

  51. def hasDefiniteSize: Boolean

    Tests whether this map is known to have a finite size

  52. def hashCode(): Int

    Returns a hash code value for the object

  53. def head: (A, B)

    Selects the first element of this map

  54. def headOption: Option[(A, B)]

    Optionally selects the first element

  55. def init: Map[A, B]

    Selects all elements except the last

  56. def isDefinedAt(key: A): Boolean

    Tests whether this map contains a binding for a key

  57. def isEmpty: Boolean

    Tests whether this map is empty

  58. def iterator: Iterator[(A, B)]

    Creates a new iterator over all elements contained in this iterable object

  59. def keySet: Set[A]

    Collects all keys of this map in a set

  60. def keys: Iterator[A]

    Creates an iterator for all keys

  61. def keysIterator: Iterator[A]

    Creates an iterator for all keys

  62. def last: (A, B)

    Selects the last element

  63. def lastOption: Option[(A, B)]

    Optionally selects the last element

  64. def lift: (A) ⇒ Option[B]

    Turns this partial function into an plain function returning an Option result

  65. def map[B, That](f: ((A, B)) ⇒ B)(bf: CanBuildFrom[Map[A, B], B, That]): That

    Builds a new collection by applying a function to all elements of this map

  66. def mapElements[C](f: (B) ⇒ C): DefaultMap[A, C]

  67. def mapValues[C](f: (B) ⇒ C): DefaultMap[A, C]

    A map view resulting from applying a given function f to each value associated with a key in this map

  68. def max[B >: (A, B)](cmp: Ordering[B]): (A, B)

    Finds the largest element

  69. def min[B >: (A, B)](cmp: Ordering[B]): (A, B)

    Finds the smallest element

  70. def mkString: String

    Displays all elements of this map in a string

  71. def mkString(sep: String): String

    Displays all elements of this map in a string using a separator string

  72. def mkString(start: String, sep: String, end: String): String

    Displays all elements of this map in a string using start, end, and separator strings

  73. def nonEmpty: Boolean

    Tests whether the map is not empty

  74. def orElse[A1 <: A, B1 >: B](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

    Composes this partial function with a fallback partial function which gets applied where this partial function is not defined

  75. def partialMap[B, That](pf: PartialFunction[(A, B), B])(bf: CanBuildFrom[Map[A, B], B, That]): That

    Builds a new collection by applying a partial function to all elements of this map on which the function is defined

  76. def partition(p: ((A, B)) ⇒ Boolean): (Map[A, B], Map[A, B])

    Partitions this map in two maps according to a predicate

  77. def product[B >: (A, B)](num: Numeric[B]): B

    Multiplies up the elements of this collection

  78. def projection: IterableView[(A, B), Map[A, B]]

    returns a projection that can be used to call non-strict filter,map, and flatMap methods that build projections of the collection

  79. def reduceLeft[B >: (A, B)](op: (B, (A, B)) ⇒ B): B

    Applies a binary operator to all elements of this map, going left to right

  80. def reduceLeftOption[B >: (A, B)](op: (B, (A, B)) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this map, going left to right

  81. def reduceRight[B >: (A, B)](op: ((A, B), B) ⇒ B): B

    Applies a binary operator to all elements of this map, going right to left

  82. def reduceRightOption[B >: (A, B)](op: ((A, B), B) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this map, going right to left

  83. def repr: Map[A, B]

    The collection of type map underlying this TraversableLike object

  84. def sameElements[B >: (A, B)](that: Iterable[B]): Boolean

    Checks if the other iterable collection contains the same elements in the same order as this map

  85. def self: Map[A, B]

  86. def size: Int

    The size of this map

  87. def slice(from: Int, until: Int): Map[A, B]

    Selects an interval of elements

  88. def span(p: ((A, B)) ⇒ Boolean): (Map[A, B], Map[A, B])

    Spits this map into a prefix/suffix pair according to a predicate

  89. def splitAt(n: Int): (Map[A, B], Map[A, B])

    Splits this map into two at a given position

  90. def stringPrefix: String

    Defines the prefix of this object's toString representation

  91. def sum[B >: (A, B)](num: Numeric[B]): B

    Sums up the elements of this collection

  92. def tail: Map[A, B]

    Selects all elements except the first

  93. def take(n: Int): Map[A, B]

    Selects first n elements

  94. def takeRight(n: Int): Map[A, B]

    Selects last n elements

  95. def takeWhile(p: ((A, B)) ⇒ Boolean): Map[A, B]

    Takes longest prefix of elements that satisfy a predicate

  96. def toArray[B >: (A, B)](arg0: ClassManifest[B]): Array[B]

    Converts this map to an array

  97. def toIndexedSeq[B >: (A, B)]: IndexedSeq[B]

    Converts this map to an indexed sequence

  98. def toIterable: Iterable[(A, B)]

    Converts this map to an iterable collection

  99. def toList: List[(A, B)]

    Converts this map to a list

  100. def toSeq: Seq[(A, B)]

    Converts this map to a sequence

  101. def toSet[B >: (A, B)]: Set[B]

    Converts this map to a set

  102. def toStream: Stream[(A, B)]

    Converts this map to a stream

  103. def toString(): String

    Returns a string representation of the object

  104. def transpose[B](asTraversable: ((A, B)) ⇒ Traversable[B]): Iterable[Iterable[B]]

    Transposes this map of traversable collections into

  105. def unzip[A1, A2](asPair: ((A, B)) ⇒ (A1, A2)): (Iterable[A1], Iterable[A2])

    Converts this map of pairs into two collections of the first and second halfs of each pair

  106. def updated[B1 >: B](key: A, value: B1): Map[A, B1]

    Creates a new map obtained by updating this map with a given key/value pair

  107. def values: Iterator[B]

    Creates an iterator for all contained values

  108. def valuesIterable: Iterable[B]

    Collects all values of this map in an iterable collection

  109. def valuesIterator: Iterator[B]

    Creates an iterator for all values in this map

  110. def view(from: Int, until: Int): IterableView[(A, B), Map[A, B]]

    Creates a non-strict view of a slice of this map

  111. def view: IterableView[(A, B), Map[A, B]]

    Creates a non-strict view of this map

  112. def withFilter(p: ((A, B)) ⇒ Boolean): WithFilter

    Creates a non-strict filter of this map

  113. def zip[A1 >: (A, B), B, That](that: Iterable[B])(bf: CanBuildFrom[Map[A, B], (A1, B), That]): That

    Returns a map formed from this map and another iterable collection by combining corresponding elements in pairs

  114. def zipAll[B, A1 >: (A, B), That](that: Iterable[B], thisElem: A1, thatElem: B)(bf: CanBuildFrom[Map[A, B], (A1, B), That]): That

    Returns a map formed from this map and another iterable collection by combining corresponding elements in pairs

  115. def zipWithIndex[A1 >: (A, B), That](bf: CanBuildFrom[Map[A, B], (A1, Int), That]): That

    Zips this map with its indices