com.g2forge.alexandria.java.associative.map.MapBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ax-java Show documentation
Show all versions of ax-java Show documentation
Standard Java library and the basis of the ${alexandria.name} project.
package com.g2forge.alexandria.java.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;
}
}