/**
 * Copyright © 2012-2021 by Data Virtuality GmbH
 */
package org.teiid.query.scripts.python;

import javax.script.Bindings;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * @author Nicolas Golovan
 * @date 2021.09.05
 */
public class PythonBindings implements Bindings {
    private final Map<String, Object> properties = new HashMap<>();

    @Override
    public Object put(String key, Object value) {
        return properties.put(key, value);
    }

    @Override
    public void putAll(Map<? extends String, ?> toMerge) {
        properties.putAll(toMerge);
    }

    @Override
    public void clear() {
        properties.clear();
    }

    @Override
    public Set<String> keySet() {
        return properties.keySet();
    }

    @Override
    public Collection<Object> values() {
        return properties.values();
    }

    @Override
    public Set<Entry<String, Object>> entrySet() {
        return properties.entrySet();
    }

    @Override
    public int size() {
        return properties.size();
    }

    @Override
    public boolean isEmpty() {
        return properties.isEmpty();
    }

    @Override
    public boolean containsKey(Object key) {
        return properties.containsKey(key);
    }

    @Override
    public boolean containsValue(Object value) {
        return properties.containsValue(value);
    }

    @Override
    public Object get(Object key) {
        return properties.get(key);
    }

    @Override
    public Object remove(Object key) {
        return properties.remove(key);
    }

}
