New map map.

@param <K>        the type parameter
@param <V>        the type parameter
@param collection the collection
@return the map
495866
public static <K, V> Map<K, V> newMap(
            Collection<Map.Entry<K, V>> collection) {
        return collection.stream()
                .collect(toMap(Map.Entry::getKey, Map.Entry::getValue));
    }
723455
public static <K, V> HashMap<K, V> newHashMap(K key, V value) {
        HashMap<K, V> map = new HashMap<K, V>();
        map.put(key, value);
        return map;
    }
565789
public static <K, V> Map<K, V> newLinkedHashMap(Map<? extends K, ? extends V> m) {
    return new LinkedHashMap<K, V>(m);
  }
845380
public static Mapper mapMapper(final Map map) {
        return new Mapper() {
            public Object map(final Object a) {
                return map.get(a);
            }
        };
    }
1108040
public static <K, V> Map<K, V> toSortedMap(Map<K, V> map, Comparator<? super K> comparator) {
        Map<K, V> sortedMap;
        if (comparator == null)
            sortedMap = new LinkedHashMap<>();
        else
            sortedMap = new TreeMap<>(comparator);
        sortedMap.putAll(map);
        return sortedMap;
    }
866288
@SuppressWarnings("unchecked")
    public M newInstance(final Map<String, V> map) {
        return (M) new MapMessage<>(map);
    }
993011
public static <K, V> StreamableHashMap<K, V> newMap (Map<? extends K, ? extends V> map)
    {
        return new StreamableHashMap<K, V>(map);
    }
466146
public static <K, V extends Comparable<? super V>> Map<K, V> sortByValue(
            Map<K, V> map) {
        return sortByValue(map, false);
    }
807233
public static <K, V> ListMultimap<K, V> newLinkedHashListMultimap() {
		return Multimaps.newListMultimap(Maps.<K, Collection<V>> newLinkedHashMap(), new Supplier<List<V>>() {
			@Override
			public List<V> get() {
				return Lists.newArrayList();
			}
		});
	}
991746
public static Collection map(Mapper mapper, Object o) {
        return java.util.Collections.singleton(mapper.map(o));
    }
797348
public static <K, V> MapBuilder<K, V> builder(Map<K, V> map) {
		return new MapBuilder<>(map);
	}
316876
public static <T, K> HashMap<K, T> toHashMap(Collection<T> entities,
			Function<T, K> keyMapper) {
		return toMap(entities, keyMapper, HashMap<K, T>::new);
	}
357661
public static Map<String, Object> newMap(String key, Object value) {
        final Map<String, Object> result = newMap();
        result.put(key, value);
        return result;
    }
1188448
public static <K, V, C extends Collection<V>> void putIntoValueCollection(Map<K, C> map, K key, V value, CollectionFactory<V> cf) {
    C c = map.get(key);
    if (c == null) {
      c = ErasureUtils.<C>uncheckedCast(cf.newCollection());
      map.put(key, c);
    }
    c.add(value);
  }
85508
public static Collection map(Mapper mapper, Collection c) {
        return map(mapper, c, false);
    }
1320685
public static Map<String, Number> buildStatsMap(
            Collection<Number> numberCollection) {
        return JMMap.newChangedKeyMap(
                getOptional(numberCollection).map(NumberSummaryStatistics::of)
                        .map(NumberSummaryStatistics::getStatsFieldMap)
                        .orElseGet(Collections::emptyMap), StatsField::name);
    }
243354
public static <K, V> void putIntoValueArrayList(Map<K, List<V>> map, K key, V value) {
    CollectionFactory<V> factory = CollectionFactory.arrayListFactory();
    putIntoValueCollection(map, key, value, factory);
  }