class CollectionUtil {

  public static <K, V> Map<K, V> toImmutableMap(Map<K, V> map) {
    if (map instanceof ImmutableMap) {
      return map;
    }
    return ImmutableMap.copyOf(map);
  }

  private  CollectionUtil();

}