com.g2forge.alexandria.adt.associative.map.MapBuilder Maven / Gradle / Ivy
package com.g2forge.alexandria.adt.associative.map;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.Function;
public class MapBuilder {
protected final Map map = new LinkedHashMap<>();
public Map build() {
return map;
}
public Function get() {
return build()::get;
}
public MapBuilder put(K key, V value) {
map.put(key, value);
return this;
}
}