public class IsMapContaining<K,V> extends TypeSafeMatcher<java.util.Map<K,V>>
| Constructor and Description |
|---|
IsMapContaining(Matcher<K> keyMatcher,
Matcher<V> valueMatcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(Description description)
Generates a description of the object.
|
static <K,V> Matcher<java.util.Map<K,V>> |
hasEntry(K key,
V value) |
static <K,V> Matcher<java.util.Map<K,V>> |
hasEntry(Matcher<K> keyMatcher,
Matcher<V> valueMatcher) |
static <K,V> Matcher<java.util.Map<K,V>> |
hasKey(K key) |
static <K,V> Matcher<java.util.Map<K,V>> |
hasKey(Matcher<K> keyMatcher) |
static <K,V> Matcher<java.util.Map<K,V>> |
hasValue(Matcher<V> valueMatcher) |
static <K,V> Matcher<java.util.Map<K,V>> |
hasValue(V value) |
boolean |
matchesSafely(java.util.Map<K,V> map)
Subclasses should implement this.
|
matches_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringpublic boolean matchesSafely(java.util.Map<K,V> map)
TypeSafeMatchermatchesSafely in class TypeSafeMatcher<java.util.Map<K,V>>public void describeTo(Description description)
SelfDescribingdescription - The description to be built or appended to.public static <K,V> Matcher<java.util.Map<K,V>> hasEntry(Matcher<K> keyMatcher, Matcher<V> valueMatcher)
public static <K,V> Matcher<java.util.Map<K,V>> hasEntry(K key, V value)
public static <K,V> Matcher<java.util.Map<K,V>> hasKey(K key)
public static <K,V> Matcher<java.util.Map<K,V>> hasValue(V value)