private static Map < ? , ? > mapOfEntries ( Entry < ? , ? > ... entries ) { Map < Object , Object > looseTypedMap = new LinkedHashMap <> ( entries . length ) ; for ( Entry < ? , ? > entry : entries ) looseTypedMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; return looseTypedMap ; }
Relaxed implementation of the java 9 Map . ofEntries . LinkedHashMap ensures element order remains as supplied .