public class IsMapContainingKey<K> extends TypeSafeMatcher<java.util.Map<? super K,?>>
| Constructor and Description |
|---|
IsMapContainingKey(Matcher<? super K> keyMatcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeMismatchSafely(java.util.Map<? super K,?> map,
Description mismatchDescription)
Subclasses should override this.
|
void |
describeTo(Description description)
Generates a description of the object.
|
static <K> Matcher<java.util.Map<? super K,?>> |
hasKey(K key) |
static <K> Matcher<java.util.Map<? super K,?>> |
hasKey(Matcher<? super K> keyMatcher) |
boolean |
matchesSafely(java.util.Map<? super K,?> item)
Subclasses should implement this.
|
describeMismatch, matches_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringpublic boolean matchesSafely(java.util.Map<? super K,?> item)
TypeSafeMatchermatchesSafely in class TypeSafeMatcher<java.util.Map<? super K,?>>public void describeMismatchSafely(java.util.Map<? super K,?> map, Description mismatchDescription)
TypeSafeMatcherdescribeMismatchSafely in class TypeSafeMatcher<java.util.Map<? super K,?>>public void describeTo(Description description)
SelfDescribingdescription - The description to be built or appended to.public static <K> Matcher<java.util.Map<? super K,?>> hasKey(K key)