Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hamcrest.collection
Class IsMapContaining<K,V>

    java.lang.Object
      org.hamcrest.BaseMatcher<T>
          org.hamcrest.TypeSafeMatcher<Map<K,V>>
              org.hamcrest.collection.IsMapContaining<K,V>

All Implemented Interfaces:
  Matcher<Map<K,V>>, SelfDescribing

    public class IsMapContaining<K,V>

extends TypeSafeMatcher<Map<K,V>>

Constructor Summary
`IsMapContaining(Matcher<K> keyMatcher, Matcher<V> valueMatcher)`

Method Summary
`void` | `describeTo(Description description)` Generates a description of the object.
`static
`<K,V> Matcher<Map<K,V>>`
` | `hasEntry(K key, V value)`
`static
`<K,V> Matcher<Map<K,V>>`
` | `hasEntry(Matcher<K> keyMatcher, Matcher<V> valueMatcher)`
`static
`<K,V> Matcher<Map<K,V>>`
` | `hasKey(K key)`
`static
`<K,V> Matcher<Map<K,V>>`
` | `hasKey(Matcher<K> keyMatcher)`
`static
`<K,V> Matcher<Map<K,V>>`
` | `hasValue(Matcher<V> valueMatcher)`
`static
`<K,V> Matcher<Map<K,V>>`
` | `hasValue(V value)`
`boolean` | `matchesSafely(Map<K,V> map)` Subclasses should implement this.

Methods inherited from class org.hamcrest.TypeSafeMatcher
`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`

Constructor Detail

### IsMapContaining

    public IsMapContaining(Matcher<K> keyMatcher,
                           Matcher<V> valueMatcher)

Method Detail

### matchesSafely

    public boolean matchesSafely(Map<K,V> map)

  Description copied from class: `TypeSafeMatcher`
  Subclasses should implement this. The item will already have been checked for the specific type and will never be null.

  Specified by:
    `matchesSafely` in class `TypeSafeMatcher<Map<K,V>>`

### describeTo

    public void describeTo(Description description)

  Description copied from interface: `SelfDescribing`
  Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.

  Parameters:
    `description` - The description to be built or appended to.

### hasEntry

    public static <K,V> Matcher<Map<K,V>> hasEntry(Matcher<K> keyMatcher,
                                                   Matcher<V> valueMatcher)

### hasEntry

    public static <K,V> Matcher<Map<K,V>> hasEntry(K key,
                                                   V value)

### hasKey

    public static <K,V> Matcher<Map<K,V>> hasKey(Matcher<K> keyMatcher)

### hasKey

    public static <K,V> Matcher<Map<K,V>> hasKey(K key)

### hasValue

    public static <K,V> Matcher<Map<K,V>> hasValue(Matcher<V> valueMatcher)

### hasValue

    public static <K,V> Matcher<Map<K,V>> hasValue(V value)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD