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

jalse.actions.ActionBindings Maven / Gradle / Ivy

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

import java.util.Map;

/**
 * An immutable key-value bindings for {@link ActionEngine} (keys are strings).
 *
 * @author Elliot Ford
 *
 */
public interface ActionBindings {

    /**
     * Whether the bindings contains a mapping for the supplied key.
     *
     * @param key
     *            Key to check.
     * @return Whether there is a value associated to this key.
     */
    default boolean containsKey(final String key) {
	return get(key) != null;
    }

    /**
     * Gets the value bound to the supplied key.
     *
     * @param key
     *            Key to check.
     * @return Bound value or null if none found.
     */
     T get(String key);

    /**
     * Maps the key-values combinations.
     *
     * @return Map of bindings key-value combinations.
     */
    Map toMap();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy