public static <K, V> Map<K, V> immutableMapView(Map<K, V> map) {
        if (map instanceof ImmutableMap<?, ?>) {
            return map;
        }
        return Collections.unmodifiableMap(map);
    }
public static < K , V > Map < K , V > immutableMapView ( Map < K , V > map ) { if ( map instanceof ImmutableMap < ? , ? > ) { return map ; } return Collections . unmodifiableMap ( map ) ; }
Returns an immutable view of a given map.