Scala Library
|
|
scala/collection/MapProxyLike.scala
]
trait
MapProxyLike[A, +B, +This <: MapLike[A, B, This] with
Map[A, B]]
extends
MapLike[A, B, This] with
IterableProxyLike[(A, B), This]Method Summary | |
override def
|
addString
(b : StringBuilder, start : java.lang.String, sep : java.lang.String, end : java.lang.String) : StringBuilder
Creates a string representation for this map.
|
override def
|
apply
(key : A) : B
Retrieve 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
|
contains
(key : A) : Boolean
Is the given key mapped to a value by this map?
|
override def
|
default
(key : A) : B
The default value for the map, returned when a key is not found
The method implemented here yields an error,
but it might be overridden in subclasses.
|
override def
|
filterKeys
(p : (A) => Boolean) : DefaultMap[A, B]
A map view consisting only of those key value pairs where the key satisfies a given
predicate `p`.
|
override 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. |
override def
|
getOrElse
[B1 >: B](key : A, default : => B1) : B1
Check if this map maps
key to a value.
Return that value if it exists, otherwise return default . |
override def
|
isDefinedAt
(key : A) : Boolean
Does this map contain a mapping from the given key to a value?
|
override def
|
isEmpty
: Boolean
Is this an empty map?
|
override def
|
iterator
: Iterator[(A, B)]
An iterator yielding all key/value mappings of this map.
|
override def
|
keySet : Set[A] |
override def
|
keys
: Iterator[A]
Creates an iterator for all keys.
|
override def
|
keysIterator
: Iterator[A]
Creates an iterator for all keys.
|
override 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.
|
override def
|
values
: Iterator[B]
Creates an iterator for a contained values.
|
override def
|
valuesIterable : Iterable[B] |
override def
|
valuesIterator
: Iterator[B]
Creates an iterator for a contained values.
|
Methods inherited from IterableProxyLike | |
foreach, foldRight, reduceRight, toIterable, zip, zipAll, zipWithIndex, head, takeRight, dropRight, sameElements, toStream, view, view |
Methods inherited from TraversableProxyLike | |
self (abstract), nonEmpty, size, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, remove, partition, groupBy, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, tail, last, lastOption, init, take, drop, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSeq, toSet, mkString, mkString, mkString, addString, addString, stringPrefix |
Methods inherited from Proxy | |
hashCode, equals, toString |
Methods inherited from MapLike | |
empty (abstract), + (abstract), - (abstract), newBuilder, mapElements, updated, +, ++, ++ |
Methods inherited from Subtractable | |
-, --, -- |
Methods inherited from IterableLike | |
thisCollection, toCollection, elements, canEqual, first, firstOption, projection |
Methods inherited from TraversableLike | |
repr, partialMap, sum, product, min, max, toIndexedSeq, withFilter |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from AnyRef | |
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
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.override
def
isEmpty : Boolean
true
iff the map does not contain any key/value mapping.key
to a value.
Return that value if it exists, otherwise return default
.key -
the key.default -
a computation that yields a default value in case no binding for the key is found in the map.key -
the keykey -
the keytrue
iff there is a mapping for key in this mapkey -
the keytrue
iff there is a mapping for key in this mapkey -
the given key valueoverride
def
filterKeys(p : (A) => Boolean) : DefaultMap[A, B]
override
def
mapValues[C](f : (B) => C) : DefaultMap[A, C]
override
def
addString(b : StringBuilder, start : java.lang.String, sep : java.lang.String, end : java.lang.String) : StringBuilder
Scala Library
|
|