|
Scala Library
|
|
class
OpenHashMap[Key, Value](initialSize : Int)
extends Map[Key, Value]| Additional Constructor Summary | |
def
|
this : OpenHashMap[Key, Value] |
| Method Summary | |
def
|
-=
(key : Key) : Unit
Remove a key from this map, noop if key is not present.
|
override def
|
clone
: OpenHashMap[Key, Value]
Return a clone of this map.
|
def
|
elements
: Iterator[(Key, Value)]
An iterator over the elements of this map. Use of this iterator follows the same
contract for concurrent modification as the foreach method.
|
override def
|
foreach
(f : ((Key, Value)) => Unit) : Unit
Loop over the key, value mappings of this map.
The behaviour of modifying the map during an iteration is as follows:
|
def
|
get
(key : Key) : Option[Value]
Check if this map maps
key to a value and return the
value if it exists. |
protected def
|
hashOf (key : Key) : Int |
override def
|
retain
(f : (Key, Value) => Boolean) : Unit
This method retains only those mappings for which the predicate
p returns true. |
def
|
size
: Int
Compute the number of key-to-value mappings.
|
override def
|
stringPrefix
: java.lang.String
Defines the prefix of this object's
toString representation. |
override def
|
transform
(f : (Key, Value) => Value) : Unit
This function transforms all the values of mappings contained
in this map with function
f. |
def
|
update
(key : Key, value : Value) : Unit
This method allows one to add a new mapping from
key
to value to the map. If the map already contains a
mapping for key, it will be overridden by this
function. |
| Methods inherited from Map | |
| +=, +=, ++=, ++=, +, +, ++, ++, -=, --=, --=, -, removeKey, put, -, --, --, clear, getOrElseUpdate, <<, readOnly, +=, incl, excl |
| Methods inherited from Map | |
| getOrElse, isEmpty, apply, contains, isDefinedAt, keys, keySet, values, equals, hashCode, toString, default, projection, filterKeys, mapElements |
| Methods inherited from Collection | |
| toArray |
| Methods inherited from Iterable | |
| concat, ++, map, flatMap, filter, partition, takeWhile, dropWhile, take, drop, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toSeq, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, hasDefiniteSize |
| Methods inherited from PartialFunction | |
| orElse, andThen |
| Methods inherited from Function1 | |
| compose |
| Methods inherited from AnyRef | |
| getClass, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Additional Constructor Details |
| Method Details |
def
size : Int
key
to value to the map. If the map already contains a
mapping for key, it will be overridden by this
function.key - The key to updatevalue - The new valuekey - the key to be removedkey to a value and return the
value if it exists.key - the key of the mapping of interestoverride
def
clone : OpenHashMap[Key, Value]
f - The function to apply to each key, value mapping.f.f - The transformation to applyp returns true.p - The test predicateoverride
def
stringPrefix : java.lang.String
toString representation.|
Scala Library
|
|