// ** This file was generated with DemFGen (vers:4/15/2011)

package nwf;

import edu.neu.ccs.demeterf.lib.*;
import edu.neu.ccs.demeterf.lib.*;
import scg.*;
import edu.neu.ccs.demeterf.lib.*;
import edu.neu.ccs.demeterf.*;
import java.util.Iterator;





/** Representation of NWFSolution */
public class NWFSolution implements SolutionI{
    protected EdgeLabeledGraph<Node, EdgeCapacity, EdgeFlow> g;
    protected Node source;
    protected Node sink;

    /** Construct a(n) NWFSolution Instance */
    public NWFSolution(EdgeLabeledGraph<Node, EdgeCapacity, EdgeFlow> g, Node source, Node sink){
        this.g = g;
        this.source = source;
        this.sink = sink;
    }
    /** Is the given object Equal to this NWFSolution? */
    public boolean equals(Object o){
        if(!(o instanceof NWFSolution))return false;
        if(o == this)return true;
        NWFSolution oo = (NWFSolution)o;
        return (((Object)g).equals(oo.g))&&(((Object)source).equals(oo.source))&&(((Object)sink).equals(oo.sink));
    }
    /** Parse an instance of NWFSolution from the given String */
    public static NWFSolution parse(String inpt) throws nwf.ParseException{
        return new nwf.TheParser(new java.io.StringReader(inpt)).parse_NWFSolution();
    }
    /** Parse an instance of NWFSolution from the given Stream */
    public static NWFSolution parse(java.io.InputStream inpt) throws nwf.ParseException{
        return new nwf.TheParser(inpt).parse_NWFSolution();
    }
    /** Parse an instance of NWFSolution from the given Reader */
    public static NWFSolution parse(java.io.Reader inpt) throws nwf.ParseException{
        return new nwf.TheParser(inpt).parse_NWFSolution();
    }

    /** Field Class for NWFSolution.g */
    public static class g extends edu.neu.ccs.demeterf.Fields.any{}
    /** Field Class for NWFSolution.source */
    public static class source extends edu.neu.ccs.demeterf.Fields.any{}
    /** Field Class for NWFSolution.sink */
    public static class sink extends edu.neu.ccs.demeterf.Fields.any{}

    /** DGP method from Class Display */
    public String display(){ return nwf.Display.DisplayM(this); }
    /** DGP method from Class Print */
    public String print(){ return nwf.Print.PrintM(this); }
    /** DGP method from Class ToStr */
    public String toStr(){ return nwf.ToStr.ToStrM(this); }
    /** DGP method from Class PrintToString */
    public String toString(){ return nwf.PrintToString.PrintToStringM(this); }
    /** DGP method from Class HashCode */
    public int hashCode(){ return nwf.HashCode.HashCodeM(this); }
    /** Setter for field NWFSolution.g */
    public void setG(EdgeLabeledGraph<Node,EdgeCapacity,EdgeFlow> _g){ g = _g; }
    /** Setter for field NWFSolution.source */
    public void setSource(Node _source){ source = _source; }
    /** Setter for field NWFSolution.sink */
    public void setSink(Node _sink){ sink = _sink; }
    /** Getter for field NWFSolution.g */
    public EdgeLabeledGraph<Node,EdgeCapacity,EdgeFlow> getG(){ return g; }
    /** Getter for field NWFSolution.source */
    public Node getSource(){ return source; }
    /** Getter for field NWFSolution.sink */
    public Node getSink(){ return sink; }

}


