// ** This file was generated with DemFGen (vers:4/15/2011) package csp; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import scg.*; import java.util.Iterator; /** Representation of CSPConfig */ public class CSPConfig implements DomainConfigI{ protected int maxRelNum; protected int maxVariables; /** Construct a(n) CSPConfig Instance */ public CSPConfig(int maxRelNum, int maxVariables){ this.maxRelNum = maxRelNum; this.maxVariables = maxVariables; } /** Is the given object Equal to this CSPConfig? */ public boolean equals(Object o){ if(!(o instanceof CSPConfig))return false; if(o == this)return true; CSPConfig oo = (CSPConfig)o; return (((Object)maxRelNum).equals(oo.maxRelNum))&&(((Object)maxVariables).equals(oo.maxVariables)); } /** Parse an instance of CSPConfig from the given String */ public static CSPConfig parse(String inpt) throws csp.ParseException{ return new csp.TheParser(new java.io.StringReader(inpt)).parse_CSPConfig(); } /** Parse an instance of CSPConfig from the given Stream */ public static CSPConfig parse(java.io.InputStream inpt) throws csp.ParseException{ return new csp.TheParser(inpt).parse_CSPConfig(); } /** Parse an instance of CSPConfig from the given Reader */ public static CSPConfig parse(java.io.Reader inpt) throws csp.ParseException{ return new csp.TheParser(inpt).parse_CSPConfig(); } /** Field Class for CSPConfig.maxRelNum */ public static class maxRelNum extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for CSPConfig.maxVariables */ public static class maxVariables extends edu.neu.ccs.demeterf.Fields.any{} private static CSPConfig DEFAULT_CSP_CONFIG; static{ try{ DEFAULT_CSP_CONFIG = CSPConfig.parse( "csp_config[\n" + "maxRelNum: 255\n" + "maxVariables: 10\n" + "]" ); }catch(Exception ex){ ex.printStackTrace(); } } public static CSPConfig getDefaultDomainConfig(){ return CSPConfig.DEFAULT_CSP_CONFIG; } public static Config getDefaultConfig(){ return new Config(SCGConfig.getDefaultSCGConfig(), getDefaultDomainConfig()); } /** DGP method from Class Display */ public String display(){ return csp.Display.DisplayM(this); } /** DGP method from Class Print */ public String print(){ return csp.Print.PrintM(this); } /** DGP method from Class ToStr */ public String toStr(){ return csp.ToStr.ToStrM(this); } /** DGP method from Class PrintToString */ public String toString(){ return csp.PrintToString.PrintToStringM(this); } /** DGP method from Class HashCode */ public int hashCode(){ return csp.HashCode.HashCodeM(this); } /** Setter for field CSPConfig.maxRelNum */ public void setMaxRelNum(int _maxRelNum){ maxRelNum = _maxRelNum; } /** Setter for field CSPConfig.maxVariables */ public void setMaxVariables(int _maxVariables){ maxVariables = _maxVariables; } /** Getter for field CSPConfig.maxRelNum */ public int getMaxRelNum(){ return maxRelNum; } /** Getter for field CSPConfig.maxVariables */ public int getMaxVariables(){ return maxVariables; } }