cn.tom.kit.Multimap Maven / Gradle / Ivy
The newest version!
package cn.tom.kit;
import java.util.HashMap;
import java.util.Map;
public class Multimap extends HashMap{
private static final long serialVersionUID = 1L;
public static Multimap createMap(K k, V v){
return new Multimap(k, v);
}
public static Multimap createMap(Map map){
return new Multimap(map);
}
public Multimap() {
super();
}
public Multimap(Map map) {
super(map);
}
public Multimap(K k, V v) {
super();
put(k, v);
}
public Multimap set(K k, Object v){
super.put(k, (V)v);
return this;
}
}