public static Map < String , Object > mapOf ( Object data ) { if ( data == null || isNull ( data ) ) { return Collections . emptyMap ( ) ; } if ( data instanceof Map < ? , ? > ) { @ SuppressWarnings ( "unchecked" ) Map < String , Object > result = ( Map < String , Object > ) data ; return result ; } Map < String , Object > result = new DataMap ( data , false ) ; return result ; }
Returns the map to use for the given data that is treated as a map from string key to some value .