com.jayway.jsonassert.impl.matcher
Class IsMapContainingKey<K>

java.lang.Object
  extended by org.hamcrest.BaseMatcher<M>
      extended by com.jayway.jsonassert.impl.matcher.MapTypeSafeMatcher<Map<K,?>>
          extended by com.jayway.jsonassert.impl.matcher.IsMapContainingKey<K>
All Implemented Interfaces:
org.hamcrest.Matcher<Map<K,?>>, org.hamcrest.SelfDescribing

public class IsMapContainingKey<K>
extends MapTypeSafeMatcher<Map<K,?>>


Constructor Summary
IsMapContainingKey(org.hamcrest.Matcher<K> keyMatcher)
           
 
Method Summary
 void describeTo(org.hamcrest.Description description)
           
static
<K> org.hamcrest.Matcher<Map<K,?>>
hasKey(K key)
           
static
<K> org.hamcrest.Matcher<Map<K,?>>
hasKey(org.hamcrest.Matcher<K> keyMatcher)
           
 boolean matchesSafely(Map<K,?> item)
           
 
Methods inherited from class com.jayway.jsonassert.impl.matcher.MapTypeSafeMatcher
matches
 
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IsMapContainingKey

public IsMapContainingKey(org.hamcrest.Matcher<K> keyMatcher)
Method Detail

matchesSafely

public boolean matchesSafely(Map<K,?> item)
Specified by:
matchesSafely in class MapTypeSafeMatcher<Map<K,?>>

describeTo

public void describeTo(org.hamcrest.Description description)

hasKey

public static <K> org.hamcrest.Matcher<Map<K,?>> hasKey(K key)

hasKey

public static <K> org.hamcrest.Matcher<Map<K,?>> hasKey(org.hamcrest.Matcher<K> keyMatcher)


Copyright © 2011-2012. All Rights Reserved.