|
Scala Library
|
|
scala/collection/immutable/Map.scala]
class
Map2[A, +B](key1 : A, value1 : B, key2 : A, value2 : B)
extends Map[A, B]| Method Summary | |
def
|
+
[B1 >: B](kv : (A, B1)) : Map[A, B1]
Add a key/value pair to this map, returning a new map.
|
def
|
-
(key : A) : Map[A, B]
Removes a key from this map, returning a new map
|
override def
|
foreach
[U](f : ((A, B)) => U) : Unit
Apply a function
f to all elements of this
iterable object. |
def
|
get
(key : A) : Option[B]
Check if this map maps
key to a value and return the
value as an option if it exists, None if not. |
def
|
iterator
: Iterator[(A, B)]
An iterator yielding all key/value mappings of this map.
|
override def
|
size
: Int
The number of elements in this collection
|
override def
|
updated
[B1 >: B](key : A, value : B1) : Map[A, B1]
Add a key/value pair to this map.
|
| Methods inherited from Map | |
| empty, withDefault, withDefaultValue |
| Methods inherited from MapLike | |
| +, ++, ++, transform, filterNot, update |
| Methods inherited from MapLike | |
| newBuilder, isEmpty, getOrElse, apply, contains, isDefinedAt, keySet, keysIterator, keys, valuesIterable, valuesIterator, values, default, filterKeys, mapValues, mapElements, addString, stringPrefix, toString, hashCode, equals |
| Methods inherited from Subtractable | |
| -, --, -- |
| Methods inherited from PartialFunction | |
| orElse, andThen |
| Methods inherited from Function1 | |
| compose |
| Methods inherited from Iterable | |
| companion |
| Methods inherited from IterableLike | |
| thisCollection, toCollection, elements, forall, exists, find, foldRight, reduceRight, toIterable, head, take, slice, takeWhile, takeRight, dropRight, copyToArray, zip, zipAll, zipWithIndex, sameElements, toStream, canEqual, view, view, first, firstOption, projection |
| Methods inherited from GenericTraversableTemplate | |
| genericBuilder, unzip, flatten, transpose |
| Methods inherited from TraversableLike | |
| repr, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, drop, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toList, toSeq, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, withFilter |
| Methods inherited from AnyRef | |
| getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Method Details |
override
def
size : Int
key to a value and return the
value as an option if it exists, None if not.key - the key of the mapping of interest.key - the keyvalue - the valuekv - the key/value pairkey - the key to be removedkeyf to all elements of this
iterable object.f - A function that is applied for its side-effect to every element. The result (of arbitrary type U) of function `f` is discarded.|
Scala Library
|
|