New map map.

@param <K>     the type parameter
@param <V>     the type parameter
@param entries the entries
@return the map
177727
@SafeVarargs
    public static <K, V> Map<K, V> newMap(Map.Entry<K, V>... entries) {
        return newMap(Arrays.asList(entries));
    }
1063423
public static <K, V> Map<K, V> newFilteredMap(Map<K, V> map,
            Predicate<? super Entry<K, V>> filter) {
        return getEntryStreamWithFilter(map, filter)
                .collect(toMap(Entry::getKey, Entry::getValue));
    }
850422
public static <K, V> MapField<K, V> newMapField(MapEntry<K, V> defaultEntry) {
        return new MapField<K, V>(defaultEntry, StorageMode.MAP, new HashMap<K, V>(), null);
    }
547505
public static <K, V> Map<K, V> filter(Map<K, V> map, Editor<Entry<K, V>> editor) {
		return MapUtil.filter(map, editor);
	}
940962
@SafeVarargs
   public static <T> Set<T> makeSet(T... entries) {
      return new HashSet<>(Arrays.asList(entries));
   }
1001215
static <K, V> ImmutableMapEntry<K, V> entryOf(K key, V value) {
    return new ImmutableMapEntry<K, V>(key, value);
  }
173174
protected final MapDelta<K, V> genValues(final Map<K, ? extends V> entries) {
        return entries.isEmpty() ? Nop.instance() : new Values<>(entries);

    }
347788
public static Map<String, Object> newFlatKeyMap(Map<String, ?> map) {
        return newFlatKeyMap(new HashMap<>(), map);
    }
688820
public static <K, V> Map<K, V> filter(Map<K, V> map, Filter<Entry<K, V>> filter) {
		return MapUtil.filter(map, filter);
	}
951236
public static <K, V> HashMap<K, V> newHashMap(@NotNull final K[] keys, @NotNull final V[] values) {
		Validate.isTrue(keys.length == values.length, "keys.length is %d but values.length is %d", keys.length,
				values.length);

		HashMap<K, V> map = new HashMap<K, V>(keys.length * 2);

		for (int i = 0; i < keys.length; i++) {
			map.put(keys[i], values[i]);
		}

		return map;
	}
1143454
@SuppressWarnings("ConstantConditions")
  private ImmutableMap<K,V> toRegularImmutableMap() {
    final ImmutableMap.Builder<K, V>  ret = ImmutableMap.builder();

    for (final MapEntry<K, V> entry : entries) {
      ret.put(entry.key, entry.value);
    }

    return ret.build();
  }
213294
public static <A, B> Map<A, B> fromLists(List<A> keys, List<B> values) {
    Preconditions.checkArgument(keys.size() == values.size());
    Map<A, B> map = Maps.newHashMap();
    for (int i = 0; i < keys.size(); i++) {
      map.put(keys.get(i), values.get(i));
    }
    return map;
  }
740398
@SuppressWarnings("unchecked")
    public Map<String, Class<?>> getAllEntries() {
        return (Map<String, Class<?>>) MapUtils.unmodifiableMap(entries);
    }
103081
public static <K, V> Map.Entry<K, V> immutableEntry(Map.Entry<K, V> entry) {
      return new ImmutableEntry<>(entry);
   }
812400
public static <K,V> List<Pair<K,V>> mapToPair(Map<K,V> map) {
        List<Pair<K,V>> ret = new ArrayList<>(map.size());
        for(Map.Entry<K,V> entry : map.entrySet()) {
            ret.add(Pair.of(entry.getKey(),entry.getValue()));
        }

        return ret;
    }
517819
public static <K, V> LinkedHashMap<K, V> sortByEntry(Map<K, V> map, Comparator<Map.Entry<K, V>> comparator) {
		return sortToMap(map.entrySet(), comparator);
	}
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));
    }