All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tiogasolutions.dev.common.MapBuilder Maven / Gradle / Ivy

There is a newer version: 5.2.6
Show newest version
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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy