// ** This file was generated with DemFGen (vers:12/15/2010)

package csp;

import edu.neu.ccs.demeterf.lib.*;
import edu.neu.ccs.demeterf.lib.*;
import java.lang.reflect.*;
import scg.*;





/** Representation of CSPSolution */
public class CSPSolution implements SolutionI{
    protected ListMap<Var, Boolean> assign;

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

    /** Field Class for CSPSolution.assign */
    public static class assign extends edu.neu.ccs.demeterf.Fields.any{}

    /** DGP method from Class Print */
    public String print(){ return csp.Print.PrintM(this); }
    /** Setter for field CSPSolution.assign */
    public void setAssign(ListMap<Var,Boolean> _assign){ assign = _assign; }
    /** Getter for field CSPSolution.assign */
    public ListMap<Var,Boolean> getAssign(){ return assign; }

}


