// ** 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 Clause */
public class Clause{
    protected int relnum;
    protected int weight;
    protected List<Var> vars;

    /** Construct a(n) Clause Instance */
    public Clause(int relnum, int weight, List<Var> vars){
        this.relnum = relnum;
        this.weight = weight;
        this.vars = vars;
    }
    /** Is the given object Equal to this Clause? */
    public boolean equals(Object o){
        if(!(o instanceof Clause))return false;
        if(o == this)return true;
        Clause oo = (Clause)o;
        return (((Object)relnum).equals(oo.relnum))&&(((Object)weight).equals(oo.weight))&&(((Object)vars).equals(oo.vars));
    }
    /** Parse an instance of Clause from the given String */
    public static Clause parse(String inpt) throws csp.ParseException{
        return new csp.TheParser(new java.io.StringReader(inpt)).parse_Clause();
    }
    /** Parse an instance of Clause from the given Stream */
    public static Clause parse(java.io.InputStream inpt) throws csp.ParseException{
        return new csp.TheParser(inpt).parse_Clause();
    }
    /** Parse an instance of Clause from the given Reader */
    public static Clause parse(java.io.Reader inpt) throws csp.ParseException{
        return new csp.TheParser(inpt).parse_Clause();
    }

    /** Field Class for Clause.relnum */
    public static class relnum extends edu.neu.ccs.demeterf.Fields.any{}
    /** Field Class for Clause.weight */
    public static class weight extends edu.neu.ccs.demeterf.Fields.any{}
    /** Field Class for Clause.vars */
    public static class vars extends edu.neu.ccs.demeterf.Fields.any{}

    /** 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 Clause.relnum */
    public void setRelnum(int _relnum){ relnum = _relnum; }
    /** Setter for field Clause.weight */
    public void setWeight(int _weight){ weight = _weight; }
    /** Setter for field Clause.vars */
    public void setVars(List<Var> _vars){ vars = _vars; }
    /** Getter for field Clause.relnum */
    public int getRelnum(){ return relnum; }
    /** Getter for field Clause.weight */
    public int getWeight(){ return weight; }
    /** Getter for field Clause.vars */
    public List<Var> getVars(){ return vars; }

}


