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

net.n2oapp.framework.api.test.TestContextEngine Maven / Gradle / Ivy

There is a newer version: 7.28.1
Show newest version
package net.n2oapp.framework.api.test;

import net.n2oapp.framework.api.context.ContextEngine;

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

/**
 * @author iryabov
 * @since 27.10.2016
 */
public class TestContextEngine extends HashMap implements ContextEngine {

    public TestContextEngine() {
        super();
    }

    public TestContextEngine(Map baseParams) {
        super(baseParams);
    }

    @Override
    public Object get(String param, Map baseParams) {
        Object value = baseParams.get(param);
        return value != null ? value : get(param);
    }

    @Override
    public void set(Map dataSet, Map baseParams) {
        putAll(dataSet);
        putAll(baseParams);
    }

    @Override
    public Object get(String name) {
        return super.get(name);
    }

    @Override
    public void set(Map dataSet) {
        putAll(dataSet);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy