@SafeVarargs public static <K>Map<K,?> mapOf(Map.Entry<K,?>... entries){
  HashMap<K,Object> map=new HashMap<>();
  for (  Map.Entry<K,?> entry : entries) {
    map.put(entry.getKey(),entry.getValue());
  }
  return Collections.unmodifiableMap(map);
}

@ SafeVarargs public static < K > Map < K , ? > mapOf ( Map . Entry < K , ? > ... entries ) { HashMap < K , Object > map = new HashMap < > ( ) ; for ( Map . Entry < K , ? > entry : entries ) { map . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } return Collections . unmodifiableMap ( map ) ; }
creates a map from a variable length array of map entries .
