org.tiogasolutions.dev.common.MapBuilder Maven / Gradle / Ivy
package org.tiogasolutions.dev.common;
import java.util.*;
public class MapBuilder {
private final LinkedHashMap map = new LinkedHashMap<>();
public MapBuilder(Class keyType, Class valueType) {
}
public HashMap buildHashMap() {
return new HashMap<>(map);
}
public Hashtable buildHashtable() {
return new Hashtable<>(map);
}
public TreeMap buildTreeMap() {
return new TreeMap<>(map);
}
public LinkedHashMap buildLinkedHashMap() {
return map;
}
public MapBuilder put(K key, V value) {
map.put(key, value);
return this;
}
}