public static String asString ( Map < ? , ? > map ) { if ( map == null ) { return NULL ; } StringBuilder builder = new StringBuilder ( ) ; builder . append ( ' ' ) ; boolean first = true ; for ( Map . Entry < ? , ? > entry : map . entrySet ( ) ) { if ( first ) { first = false ; } else { builder . append ( ' ' ) ; } builder . append ( asString ( entry . getKey ( ) ) ) . append ( ' ' ) . append ( asString ( entry . getValue ( ) ) ) ; } builder . append ( ' ' ) ; return builder . toString ( ) ; }
Make a minimal printable string value from a typed map .