class HMap[KeyType[_] <: HMapKey[_]] extends AnyRef
A map containing keys of heterogeneous values. The keys in this map must
implement HMapKey[V], where V is the type of its associated key.
- KeyType
the type of keys used in this map
- Annotations
- @deprecated
- Deprecated
(Since version 2017/07/13) This will be removed in a future version
- Alphabetic
- By Inheritance
- HMap
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
++(other: HMap[KeyType]): HMap[KeyType]
Creates a new map containing the key/value mappings provided by the specified
HMapand all the key/value mappings of this map.Creates a new map containing the key/value mappings provided by the specified
HMapand all the key/value mappings of this map.- other
the map to append
- returns
a new map containing mappings of this map and those provided by
other.
-
def
+=[V](entry: (KeyType[V], V)): HMap.this.type
Adds a new key/value pair to this map.
Adds a new key/value pair to this map. If the map already contains a mapping for the key, it will be overridden by the new value.
- V
the type of the value in
entry- entry
the key-value pair to update
- returns
this map.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[V](key: KeyType[V]): V
Retrieves the value which is associated with a given key.
Retrieves the value which is associated with a given key. If the key does not exist in this map, a
NoSuchElementExceptionis thrown.- V
the type of the value associated with
key- key
the key to lookup
- returns
the value associated with the given key.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
copy: HMap[KeyType]
Returns a copy of this map.
Returns a copy of this map.
- returns
a copy of this map.
- val entries: ListBuffer[(KeyType[V], V) forSome {type V}]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(oth: Any): Boolean
- Definition Classes
- HMap → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
foreach(f: ((KeyType[V], V) forSome {type V}) ⇒ Unit): Unit
Applies a function
fto all elements of this map.Applies a function
fto all elements of this map.- f
the function that is applied for its side-effect to every element. The result of function
fis discarded.
-
def
get[V](key: KeyType[V]): Option[V]
Optionally returns the value associated with a key.
Optionally returns the value associated with a key.
- V
the type of the value associated with
key- key
the key to lookup
- returns
an option value containing the value associated with
keyin this map, orNoneif none exists.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getOrElse[V](key: KeyType[V], default: ⇒ V): V
Returns the value associated with a key, or a default value if the key is not contained in the map.
Returns the value associated with a key, or a default value if the key is not contained in the map.
- V
the type of the value associated with
key- key
the key to lookup
- default
a computation that yields a default value in case no binding for
keyis found in the map- returns
the value associated with
keyif it exists, otherwise the result of thedefaultcomputation.
-
def
getOrElseUpdate[V](key: KeyType[V], op: ⇒ V): V
If given key is already in this map, returns associated value.
If given key is already in this map, returns associated value. Otherwise, computes value from given expression
op, stores with key in map and returns that value.- V
the type of the value associated with
key- key
the key to lookup and possibly update
- op
the computation yielding the value to associate with
key, ifkeyis previously unbound- returns
the value associated with key (either previously or as a result of executing the method).
-
def
hashCode(): Int
- Definition Classes
- HMap → AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[A](f: ((KeyType[V], V) forSome {type V}) ⇒ A): ListBuffer[A]
Builds a new collection by applying a function to all entries of this map.
Builds a new collection by applying a function to all entries of this map.
- A
the element type of the returned collection
- f
the function to apply to each element
- returns
a new collection resulting from applying the given function
fto each element of this map and collecting the results.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
put[V](key: KeyType[V], value: V): HMap.this.type
Adds a new key/value pair to this map.
Adds a new key/value pair to this map. If the map already contains a mapping for the key, it will be overridden by the new value.
- V
the type of the value associated with
key- key
the key to update
- value
the new value
- returns
this map.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- HMap → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )