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

top.zeimao77.product.converter.MemoryRuleRepository Maven / Gradle / Ivy

package top.zeimao77.product.converter;

import java.util.HashMap;

public class MemoryRuleRepository implements RuleRepository {

    private HashMap rule;

    public MemoryRuleRepository() {
        this.rule = new HashMap<>();
    }

    public MemoryRuleRepository(HashMap rule) {
        this.rule = rule;
    }

    @Override
    public Object put(K key, Object value) {
        return this.rule.put(key,value);
    }

    @Override
    public Object get(K key) {
        return this.rule.get(key);
    }

    @Override
    public boolean containsKey(K key) {
        return this.rule.containsKey(key);
    }

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

    @Override
    public void clear() {
        this.rule.clear();
    }


    public HashMap getRule() {
        return rule;
    }

    public void setRule(HashMap rule) {
        this.rule = rule;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy