Class IsMapContainingKey<K>

  • All Implemented Interfaces:
    org.hamcrest.Matcher<java.util.Map<K,​?>>, org.hamcrest.SelfDescribing

    public class IsMapContainingKey<K>
    extends MapTypeSafeMatcher<java.util.Map<K,​?>>
    • Constructor Summary

      Constructors 
      Constructor Description
      IsMapContainingKey​(org.hamcrest.Matcher<K> keyMatcher)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void describeTo​(org.hamcrest.Description description)  
      static <K> org.hamcrest.Matcher<java.util.Map<K,​?>> hasKey​(K key)  
      static <K> org.hamcrest.Matcher<java.util.Map<K,​?>> hasKey​(org.hamcrest.Matcher<K> keyMatcher)  
      boolean matchesSafely​(java.util.Map<K,​?> item)  
      • Methods inherited from class org.hamcrest.BaseMatcher

        _dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, 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

      • describeTo

        public void describeTo​(org.hamcrest.Description description)
      • hasKey

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

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