|
Scala
1.2.0.1 |
|||
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. |
override
|
def contains(key: A): Boolean
Is the given key mapped to a value by this map? |
override
|
def foreach(f: (A,B) => Unit): Unit
Executes the given function for all (key, value) pairs contained in this map. |
override
|
def foreach(f: (A) => Unit): 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 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 keys: Iterator[A]
Creates an iterator for all keys. |
def size: Int
Compute the number of key-to-value mappings. |
|
override
|
def toList: List[Tuple2[A,B]]
Returns the mappings of this map as a list. |
override
|
def values: Iterator[B]
Creates an iterator for a contained values. |
Methods inherited from java/lang/Object-class |
clone, eq, finalize, getClass, notify, notifyAll, synchronized, wait, wait, wait |
Methods inherited from scala/Any-class |
!=, ==, asInstanceOf, isInstanceOf, match |
Methods inherited from scala/IterableProxy-class |
/:, :\, elements, exists, find, foldLeft, foldRight, forall, foreach, sameElements |
Methods inherited from scala/Proxy-class |
equals, hashCode, toString |
Method Detail |
def size: Int
def get(key: A): Option[B]
key
to a value and return the
value if it exists.
key
-
the key of the mapping of interest
override def isEmpty: Boolean
override def apply(key: A): B
key
-
the key
override def contains(key: A): Boolean
key
-
the key
override def isDefinedAt(key: A): Boolean
key
-
the key
override def keys: Iterator[A]
override def values: Iterator[B]
override def foreach(f: (A,B) => Unit): Unit
f
-
the function to execute.
override def foreach(f: (A) => Unit): Unit
f
to all elements of this
iterable object.
f
-
a function that is applied to every element.
override def toList: List[Tuple2[A,B]]
|
Scala
1.2.0.1 |
|||