public static <K,V>Map<K,V> makeImmutable(Map<K,V> mutableMap){
  Map<K,V> newMap=new HashMap<>();
  for (  Map.Entry<K,V> entry : mutableMap.entrySet()) {
    newMap.put(entry.getKey(),Utils.makeImmutable(entry.getValue()));
  }
  return Collections.unmodifiableMap(newMap);
}

public static < K , V > Map < K , V > makeImmutable ( Map < K , V > mutableMap ) { Map < K , V > newMap = new HashMap < > ( ) ; for ( Map . Entry < K , V > entry : mutableMap . entrySet ( ) ) { newMap . put ( entry . getKey ( ) , Utils . makeImmutable ( entry . getValue ( ) ) ) ; } return Collections . unmodifiableMap ( newMap ) ; }
a recursive call to make a map and all it ' s values immutable .
