|
Scala Library
|
|
scala/collection/JavaConversions.scala]
case
class
JMapWrapper[A, B](val underlying : java.util.Map[A, B])
extends Map[A, B] with MapLike[A, B, JMapWrapper[A, B]] with Product| Method Summary | |
def
|
+=
(kv : (A, B)) : JMapWrapper[A, B]
Add a new key/value mapping this map.
|
def
|
-=
(key : A) : JMapWrapper[A, B]
Delete a key from this map if it is present.
|
override def
|
clear
: Unit
Removes all elements from the set. After this operation is completed,
the set will be empty.
|
override def
|
empty : JMapWrapper[A, B] |
def
|
get
(k : 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
|
productArity
: Int
return k for a product
A(x_1,...,x_k) |
override def
|
productElement
(arg0 : Int) : Any
for a product
A(x_1,...,x_k), returns x_(n+1)
for 0 <= n < k |
override def
|
productPrefix
: java.lang.String
By default the empty string. Implementations may override this
method in order to prepend a string prefix to the result of the
toString methods.
|
override def
|
put
(k : A, v : B) : Option[B]
Adds a new mapping from
key
to value to the map. If the map already contains a
mapping for key, it will be overridden. |
override def
|
remove
(k : A) : Option[B]
If given key is defined in this map, remove it and return associated value as an Option.
If key is not present return None.
|
override def
|
size
: Int
The number of elements in this collection
|
override def
|
update
(k : A, v : B) : Unit
Adds a new mapping from
key
to value to the map. If the map already contains a
mapping for key, it will be overridden. |
| Methods inherited from Product | |
| productIterator, productElements |
| Methods inherited from MapLike | |
| newBuilder, updated, cached, +, +, ++, ++, -, removeKey, getOrElseUpdate, transform, retain, clone, result, -, --, -- |
| Methods inherited from Shrinkable | |
| -=, --=, --= |
| Methods inherited from Builder | |
| sizeHint, mapResult |
| Methods inherited from Growable | |
| +=, ++=, ++= |
| Methods inherited from MapLikeBase | |
| + |
| Methods inherited from MapLike | |
| isEmpty, getOrElse, apply, contains, isDefinedAt, keySet, keysIterator, keys, valuesIterable, valuesIterator, values, default, filterKeys, mapValues, mapElements, +, ++, ++, addString, stringPrefix, toString, hashCode, equals |
| 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, filterNot, 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, 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.
def
+=(kv : (A, B)) : JMapWrapper[A, B]
kv - the key/value pair.
def
-=(key : A) : JMapWrapper[A, B]
key - the key to be removedkey
to value to the map. If the map already contains a
mapping for key, it will be overridden.key - The key to updatevalue - The new valuekey
to value to the map. If the map already contains a
mapping for key, it will be overridden.key - The key to updatevalue - The new valuekey - the key to be removedoverride
def
clear : Unit
override
def
empty : JMapWrapper[A, B]
override
def
productPrefix : java.lang.String
override
def
productArity : Int
A(x_1,...,x_k)A(x_1,...,x_k), returns x_(n+1)
for 0 <= n < kn - the index of the element to returnIndexOutOfBoundsException - n elements after the first element|
Scala Library
|
|