public static void putAllIfNotNull ( Map < String , String > ret , Map < String , String > toPut ) { if ( toPut != null ) { ret . putAll ( toPut ) ; } }
Copies all of the elements i . e . the mappings from toPut map into ret if toPut isn t null .