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

com.giffing.bucket4j.spring.boot.starter.context.ExpressionParams Maven / Gradle / Ivy

The newest version!
package com.giffing.bucket4j.spring.boot.starter.context;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.springframework.expression.Expression;

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

/**
 * Parameter information for the evaluation of a Spring {@link Expression}
 *
 * @param  the type of the root object which us used for the SpEl expression.
 */
@RequiredArgsConstructor
public class ExpressionParams {

    @Getter
    private final R rootObject;

    @Getter
    private final Map params = new HashMap<>();

    public void addParam(String name, Object value) {
        params.put(name, value);
    }

    public ExpressionParams addParams(Map params) {
        this.params.putAll(params);
        return this;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy