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

net.objectlab.kit.collections.MapBuilder Maven / Gradle / Ivy

/**
 *
 */
package net.objectlab.kit.collections;

import java.util.Map;

/**
 * Inspired by the Google Collection builder.
 *
 * @author Benoit Xhenseval
 *
 */
public interface MapBuilder {
    String getId();

    /**
     * Associates {@code key} with {@code value} in the built map.
     * @param key key
     * @param value value
     * @return a map builder
     */
    MapBuilder put(K key, V value);

    /**
     * Associates all of the given map's keys and values in the built map.
     * @throws NullPointerException if any key or value in {@code map} is null
     * @param map Map to add
     * @return a map builder
     */
    MapBuilder putAll(Map map);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy