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

jalse.actions.MutableActionBindings Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package jalse.actions;

import java.util.Map;

/**
 * A mutable extension of {@link ActionBindings}. This can be supplied at the appropriate level for
 * editable bindings.
 *
 * @author Elliot Ford
 *
 */
public interface MutableActionBindings extends ActionBindings {

    /**
     * Binds the supplied key-value pair.
     *
     * @param key
     *            Key to bind value to.
     * @param value
     *            Value to bind.
     * @return Previously associated value or null if none were.
     */
     T put(String key, T value);

    /**
     * Binds all of the key-value pairs in the supplied map.
     *
     * @param map
     *            Key-value pairs to bind.
     */
    void putAll(Map map);

    /**
     * Removes the value bound to the supplied key.
     *
     * @param key
     *            Key to check.
     * @return Value that was bound to the key or else null if none were.
     */
     T remove(String key);

    /**
     * Removes all key-value pairs.
     */
    void removeAll();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy