|
Scala Library Documentation
|
|
scala/collection/MapProxy.scala]
trait
MapProxy[A, +B]
extends Map[A, B] with IterableProxy[(A, B)]scala.collection.Map.
It is most useful for assembling customized map abstractions
dynamically using object composition and forwarding.| Method Summary | |
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
|
get
(key : A) : Option[B]
Check if this map maps
key to a value and return the
value if it exists. |
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
|
keySet : Set[A] |
override def
|
keys
: Iterator[A]
Creates an iterator for all keys.
|
abstract def
|
self : Map[A, B] |
override def
|
size
: Int
Compute the number of key-to-value mappings.
|
override def
|
values
: Iterator[B]
Creates an iterator for a contained values.
|
| Methods inherited from IterableProxy | |
| elements, concat, map, flatMap, filter, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, sameElements, copyToBuffer, toList, mkString, addString |
| Methods inherited from Proxy | |
| hashCode, equals, toString |
| Methods inherited from Map | |
| getOrElse, projection |
| Methods inherited from Collection | |
| toArray, stringPrefix |
| Methods inherited from Iterable | |
| ++, mkString, addString, copyToArray, hasDefiniteSize |
| 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 |
override
def
size : Int
key to a value and return the
value if it exists.key - the key of the mapping of interestoverride
def
isEmpty : Boolean
true iff the map is empty.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 value|
Scala Library Documentation
|
|