org.hamcrest.collection
Class IsMapContaining<K,V>
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<java.util.Map<? extends K,? extends V>>
org.hamcrest.collection.IsMapContaining<K,V>
- All Implemented Interfaces:
- org.hamcrest.Matcher<java.util.Map<? extends K,? extends V>>, org.hamcrest.SelfDescribing
public class IsMapContaining<K,V>
- extends org.hamcrest.TypeSafeMatcher<java.util.Map<? extends K,? extends V>>
|
Constructor Summary |
IsMapContaining(org.hamcrest.Matcher<? super K> keyMatcher,
org.hamcrest.Matcher<? super V> valueMatcher)
|
|
Method Summary |
void |
describeMismatchSafely(java.util.Map<? extends K,? extends V> map,
org.hamcrest.Description mismatchDescription)
|
void |
describeTo(org.hamcrest.Description description)
|
static
<K,V> org.hamcrest.Matcher<java.util.Map<? extends K,? extends V>> |
|
hasEntry(K key,
V value)
|
static
<K,V> org.hamcrest.Matcher<java.util.Map<? extends K,? extends V>> |
|
hasEntry(org.hamcrest.Matcher<? super K> keyMatcher,
org.hamcrest.Matcher<? super V> valueMatcher)
|
static
<K> org.hamcrest.Matcher<java.util.Map<? extends K,?>> |
|
hasKey(K key)
|
static
<K> org.hamcrest.Matcher<java.util.Map<? extends K,?>> |
|
hasKey(org.hamcrest.Matcher<? super K> keyMatcher)
|
static
<V> org.hamcrest.Matcher<java.util.Map<?,? extends V>> |
|
hasValue(org.hamcrest.Matcher<? super V> valueMatcher)
|
static
<V> org.hamcrest.Matcher<java.util.Map<?,? extends V>> |
|
hasValue(V value)
|
boolean |
matchesSafely(java.util.Map<? extends K,? extends V> map)
|
| Methods inherited from class org.hamcrest.TypeSafeMatcher |
describeMismatch, matches |
| Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IsMapContaining
public IsMapContaining(org.hamcrest.Matcher<? super K> keyMatcher,
org.hamcrest.Matcher<? super V> valueMatcher)
matchesSafely
public boolean matchesSafely(java.util.Map<? extends K,? extends V> map)
- Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<java.util.Map<? extends K,? extends V>>
describeMismatchSafely
public void describeMismatchSafely(java.util.Map<? extends K,? extends V> map,
org.hamcrest.Description mismatchDescription)
- Overrides:
describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<java.util.Map<? extends K,? extends V>>
describeTo
public void describeTo(org.hamcrest.Description description)
hasEntry
public static <K,V> org.hamcrest.Matcher<java.util.Map<? extends K,? extends V>> hasEntry(org.hamcrest.Matcher<? super K> keyMatcher,
org.hamcrest.Matcher<? super V> valueMatcher)
hasEntry
public static <K,V> org.hamcrest.Matcher<java.util.Map<? extends K,? extends V>> hasEntry(K key,
V value)
hasKey
public static <K> org.hamcrest.Matcher<java.util.Map<? extends K,?>> hasKey(org.hamcrest.Matcher<? super K> keyMatcher)
hasKey
public static <K> org.hamcrest.Matcher<java.util.Map<? extends K,?>> hasKey(K key)
hasValue
public static <V> org.hamcrest.Matcher<java.util.Map<?,? extends V>> hasValue(org.hamcrest.Matcher<? super V> valueMatcher)
hasValue
public static <V> org.hamcrest.Matcher<java.util.Map<?,? extends V>> hasValue(V value)
Copyright © 2010. All Rights Reserved.