
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.
*/
@Getter
@RequiredArgsConstructor
public class ExpressionParams {
private final R rootObject;
private final Map params = new HashMap<>();
public ExpressionParams addParam(String name, Object value) {
params.put(name, value);
return this;
}
public ExpressionParams addParams(Map params) {
this.params.putAll(params);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy