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

com.groupbyinc.api.request.MatchStrategy Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package com.groupbyinc.api.request;

import com.groupbyinc.api.interfaces.MatchStrategyInterface;
import com.groupbyinc.api.interfaces.PartialMatchRuleInterface;

import java.util.ArrayList;
import java.util.List;

/**
 * @author osman
 * @internal
 */
public class MatchStrategy implements MatchStrategyInterface {

  private List rules = new ArrayList();

  public List getRules() {
    return rules;
  }

  public MatchStrategy setRules(List rules) {
    this.rules = rules;
    return this;
  }

  @Override
  public void addRule(PartialMatchRuleInterface rule) {
    rules.add(new PartialMatchRule().setTerms(rule.getTerms()).setTermsGreaterThan(rule.getTermsGreaterThan()).setMustMatch(rule.getMustMatch()).setPercentage(rule.getPercentage()));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy