package afryca.consensusmodel.variable; import java.util.HashSet; import java.util.Set; import afryca.consensusmodel.variable.restriction.Restriction; /** * Variable's restrictions * * @author Sinbad² * @version 3.0 */ public class Restrictions { private Set restrictions = new HashSet<>(); /** * Add variable's restriction * * @param restriction * Restriction */ public void addRestriction(Restriction restriction) { restrictions.add(restriction); } /** * Set all variable's restrictions * * @param relations * Set of variable's restrictions */ public void setRestrictions(Set restrictions) { this.restrictions = restrictions; } /** * Get all variable's restrictions * * @return Set of all variable's restrictions */ public Set getRestrictions() { return restrictions; } }