liqp.nodes.FilterNode Maven / Gradle / Ivy
package liqp.nodes;
import liqp.filters.Filter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class FilterNode implements LNode {
private Filter filter;
private List params;
public FilterNode(String filterName, Filter filter) {
if (filter == null) {
throw new IllegalArgumentException("no filter available named: " + filterName);
}
this.filter = filter;
this.params = new ArrayList();
}
public void add(LNode param) {
params.add(param);
}
public Object apply(Object value, Map variables) {
List