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

webit.script.lang.SimpleUnsetableBag Maven / Gradle / Ivy

// Copyright (c) 2013-2014, Webit Team. All Rights Reserved.
package webit.script.lang;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @param  the type of keys maintained by this bag
 * @param  the type of mapped values
 *
 * @author zqq90
 * @since 1.5.0
 */
public class SimpleUnsetableBag implements UnsetableBag {

    private final Map values;

    public SimpleUnsetableBag() {
        this.values = new HashMap();
    }

    public V get(K key) {
        return this.values.get(key);
    }

    public void set(K key, V value) {
        this.values.put(key, value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy