public static <K /*>>> extends @NonNull Object*/, V /*>>> extends @NonNull Object*/>
      void checkMapElementNotNull(Map<K, V> map, @javax.annotation.Nullable Object errorMessage) {
    for (Map.Entry<K, V> entry : map.entrySet()) {
      if (entry.getKey() == null || entry.getValue() == null) {
        throw new NullPointerException(String.valueOf(errorMessage));
      }
    }
  }
public static < K , V > void checkMapElementNotNull ( Map < K , V > map , @ javax . annotation . Nullable Object errorMessage ) { for ( Map . Entry < K , V > entry : map . entrySet ( ) ) { if ( entry . getKey ( ) == null || entry . getValue ( ) == null ) { throw new NullPointerException ( String . valueOf ( errorMessage ) ) ; } } }
Throws a {@link NullPointerException} if any of the map elements is null.

@param map the argument map to check for null.
@param errorMessage the message to use for the exception. Will be converted to a string using
{@link String#valueOf(Object)}.