@Test public void ofFourIsFour() { Map<String, String> map = MapUtils.of("1", "A", "2", "B", "3", "C", "4", "D"); assertThat(map, hasEntry("1", "A")); assertThat(map, hasEntry("2", "B")); assertThat(map, hasEntry("3", "C")); assertThat(map, hasEntry("4", "D")); }
public static <K, V> Map<K, V> of() { return Collections.emptyMap(); }
MapUtils { public static <K, V> Map<K, V> of() { return Collections.emptyMap(); } }
MapUtils { public static <K, V> Map<K, V> of() { return Collections.emptyMap(); } private  MapUtils(); }
MapUtils { public static <K, V> Map<K, V> of() { return Collections.emptyMap(); } private  MapUtils(); static Map<K, V> copyOf(Map<? extends K, ? extends V> map); static Map<K, V> of(); static Map<K, V> of(K k1, V v1); static Map<K, V> of(K k1, V v1, K k2, V v2); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7, K k8, V v8); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10); static Map.Entry<K, V> entry(K key, V value); @SafeVarargs @SuppressWarnings("varargs") static Map<K, V> ofEntries(Map.Entry<? extends K, ? extends V>... entries); @SuppressWarnings("unchecked") static Collector<T, ?, Map<K, U>> toUnmodifiableMap(
            Function<? super T, ? extends K> keyMapper,
            Function<? super T, ? extends U> valueMapper
    ); }
MapUtils { public static <K, V> Map<K, V> of() { return Collections.emptyMap(); } private  MapUtils(); static Map<K, V> copyOf(Map<? extends K, ? extends V> map); static Map<K, V> of(); static Map<K, V> of(K k1, V v1); static Map<K, V> of(K k1, V v1, K k2, V v2); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7, K k8, V v8); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9); static Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5,
            K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10); static Map.Entry<K, V> entry(K key, V value); @SafeVarargs @SuppressWarnings("varargs") static Map<K, V> ofEntries(Map.Entry<? extends K, ? extends V>... entries); @SuppressWarnings("unchecked") static Collector<T, ?, Map<K, U>> toUnmodifiableMap(
            Function<? super T, ? extends K> keyMapper,
            Function<? super T, ? extends U> valueMapper
    );  }