Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.cybermkd.common.util;
import java.util.HashMap;
import java.util.Map;
/**
* Created by ice on 14-12-29.
*/
public class Maper {
public static Map of() {
return new HashMap();
}
public static Map of(final K k1, final V v1) {
return new HashMap() {{
put(k1, v1);
}};
}
public static Map of(final K k1, final V v1, final K k2, final V v2) {
return new HashMap() {{
put(k1, v1);
put(k2, v2);
}};
}
public static Map of(final K k1, final V v1, final K k2, final V v2, final K k3, final V v3) {
return new HashMap() {{
put(k1, v1);
put(k2, v2);
put(k3, v3);
}};
}
public static Map of(final K k1, final V v1, final K k2, final V v2, final K k3, final V v3, final K k4, final V v4) {
return new HashMap() {{
put(k1, v1);
put(k2, v2);
put(k3, v3);
put(k4, v4);
}};
}
public static Map of(final K k1, final V v1, final K k2, final V v2, final K k3, final V v3, final K k4, final V v4, final K k5, final V v5) {
return new HashMap() {{
put(k1, v1);
put(k2, v2);
put(k3, v3);
put(k4, v4);
put(k5, v5);
}};
}
public static Map copyOf(Map map) {
return copyOf(new HashMap(), map);
}
public static Map copyOf(Map dist, Map source) {
dist.putAll(source);
return dist;
}
}