Scala Library
|
|
scala/collection/immutable/ListMap.scala
]
protected
class
Node[B1 >: B](protected val override
key : A, protected val override
value : B1)
extends
ListMap[A, B1]Method Summary | |
override def
|
-
(k : A) : ListMap[A, B1]
Creates a new mapping without the given
key .
If the map does not contain a mapping for the given key, the
method returns the same map. |
override def
|
apply
(k : A) : B1
Retrieves the value which is associated with the given key. This
method throws an exception if there is no mapping from the given
key to a value.
|
override def
|
get
(k : A) : Option[B1]
Checks if this map maps
key to a value and return the
value if it exists. |
override def
|
isEmpty
: Boolean
Is this an empty map?
|
protected override def
|
next : ListMap[A, B1] |
override def
|
size
: Int
Returns the number of mappings in this map.
|
override def
|
updated
[B2 >: B1](k : A, v : B2) : ListMap[A, B2]
This method allows one to create a new map with an
additional mapping from
key
to value . If the map contains already a
mapping for key , it will be overridden by this
function. |
Methods inherited from ListMap | |
empty, +, +, iterator |
Methods inherited from Map | |
withDefault, withDefaultValue |
Methods inherited from MapLike | |
++, ++, transform, filterNot, update |
Methods inherited from MapLike | |
newBuilder, getOrElse, 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, foreach, 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
override
def
isEmpty : Boolean
key -
the keykey
to a value and return the
value if it exists.key -
the key of the mapping of interestkey
to value
. If the map contains already a
mapping for key
, it will be overridden by this
function.k -
...v -
...key
.
If the map does not contain a mapping for the given key, the
method returns the same map.k -
...
Scala Library
|
|