object ValueMapping
Companion object for ValueMapping
that provides implicit implementations for scala.collection.GenMap
and java.util.Map
.
- Source
- ValueMapping.scala
- Alphabetic
- By Inheritance
- ValueMapping
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
implicit
def
convertEqualityToGenMapValueMapping[K, V, MAP[k, v] <: GenMap[k, v]](equality: Equality[V]): ValueMapping[MAP[K, V]]
Implicit conversion that converts an
Equality
of typeV
intoValueMapping
of typeMAP[K, V]
, whereMAP
is a subtype ofscala.collection.GenMap
.Implicit conversion that converts an
Equality
of typeV
intoValueMapping
of typeMAP[K, V]
, whereMAP
is a subtype ofscala.collection.GenMap
. This is required to support the explicitEquality
syntax, for example:(Map(1 -> "one") should contain value "ONE") (after being lowerCased)
(after being lowerCased)
will returns anEquality[String]
and this implicit conversion will convert it intoValueMapping[Map[Int, String]]
.- K
the type of the key in the
scala.collection.GenMap
- V
the type of the value in the
scala.collection.GenMap
- MAP
any subtype of
scala.collection.GenMap
- equality
Equality
of typeV
- returns
ValueMapping
of typeMAP[K, V]
-
implicit
def
convertEqualityToJavaMapValueMapping[K, V, JMAP[k, v] <: Map[k, v]](equality: Equality[V]): ValueMapping[JMAP[K, V]]
Implicit conversion that converts an
Equality
of typeV
intoValueMapping
of typeJMAP[K, V]
, whereJMAP
is a subtype ofjava.util.Map
.Implicit conversion that converts an
Equality
of typeV
intoValueMapping
of typeJMAP[K, V]
, whereJMAP
is a subtype ofjava.util.Map
. This is required to support the explicitEquality
syntax, for example:val javaMap = new java.util.HashMap[Int, String]() javaMap.put(1, "one") (javaMap should contain value "ONE") (after being lowerCased)
(after being lowerCased)
will returns anEquality[String]
and this implicit conversion will convert it intoValueMapping[java.util.HashMap[Int, String]]
.- K
the type of the key in the
java.util.Map
- V
the type of the value in the
java.util.Map
- JMAP
any subtype of
java.util.Map
- equality
Equality
of typeV
- returns
ValueMapping
of typeJMAP[K, V]
-
implicit
def
valueMappingNatureOfGenMap[K, V, MAP[k, v] <: GenMap[k, v]](implicit equality: Equality[V]): ValueMapping[MAP[K, V]]
Enable
ValueMapping
implementation forscala.collection.GenMap
.Enable
ValueMapping
implementation forscala.collection.GenMap
.- K
the type of the key in the
scala.collection.GenMap
- V
the type of the value in the
scala.collection.GenMap
- MAP
any subtype of
scala.collection.GenMap
- equality
Equality
type class that is used to check equality of value in thescala.collection.GenMap
- returns
ValueMapping[MAP[K, V]]
that supportsscala.collection.GenMap
incontain value
syntax
-
implicit
def
valueMappingNatureOfJavaMap[K, V, JMAP[k, v] <: Map[k, v]](implicit equality: Equality[V]): ValueMapping[JMAP[K, V]]
Enable
ValueMapping
implementation forjava.util.Map
.Enable
ValueMapping
implementation forjava.util.Map
.- K
the type of the key in the
java.util.Map
- V
the type of the value in the
java.util.Map
- JMAP
any subtype of
java.util.Map
- equality
Equality
type class that is used to check equality of value in thejava.util.Map
- returns
ValueMapping[JMAP[K, V]]
that supportsjava.util.Map
incontain
value
syntax