com.icthh.xm.lep.core.DefaultContext Maven / Gradle / Ivy
package com.icthh.xm.lep.core;
import com.icthh.xm.lep.api.Context;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@Deprecated(forRemoval = true)
public class DefaultContext implements Context {
private final Map values = new HashMap<>();
@Override
public Set getNames() {
return Collections.unmodifiableSet(values.keySet());
}
@Override
public boolean contains(String name) {
return values.containsKey(name);
}
@Override
public Object getValue(String name) {
return values.get(name);
}
@Override
public T getValue(String name, Class castToType) {
return castToType.cast(getValue(name));
}
@Override
public void setValue(String name, Object value) {
values.put(name, value);
}
@Override
public Map getValues() {
return Collections.unmodifiableMap(values);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy