trait KeyMapping[-M] extends AnyRef
Supertrait for typeclasses that enable contain key
matcher syntax.
A KeyMapping[M]
provides access to the "key mapping nature" of type M
in such
a way that contain key
matcher syntax can be used with type M
. A M
can be any type for which contain key
syntax makes sense. ScalaTest provides implicit implementations
for scala.collection.GenMap
and java.util.Map
. You can enable the contain key
matcher syntax on your own type U
by defining a KeyMapping[U]
for the type and making it
available implicitly.
ScalaTest provides implicit KeyMapping
instances for scala.collection.GenMap
,
and java.util.Map
in the KeyMapping
companion object.
- Source
- KeyMapping.scala
- Alphabetic
- By Inheritance
- KeyMapping
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
containsKey(map: M, key: Any): Boolean
Check if the passed
map
contains the passedkey
.Check if the passed
map
contains the passedkey
.- map
a map about which an assertion is being made
- key
key of which should be contained in the passed map
- returns
true if the passed map contains the passed key
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- 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( ... )