// ** This file was generated with DemFGen (vers:4/12/2011) package gen; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; /** Representation of NetworkFlowInstance */ public class NetworkFlowInstance{ protected final EdgeLabeledGraph> g; protected final Node source; protected final Node sink; /** Construct a(n) NetworkFlowInstance Instance */ public NetworkFlowInstance(EdgeLabeledGraph> g, Node source, Node sink){ this.g = g; this.source = source; this.sink = sink; } /** Is the given object Equal to this NetworkFlowInstance? */ public boolean equals(Object o){ if(!(o instanceof NetworkFlowInstance))return false; if(o == this)return true; NetworkFlowInstance oo = (NetworkFlowInstance)o; return (((Object)g).equals(oo.g))&&(((Object)source).equals(oo.source))&&(((Object)sink).equals(oo.sink)); } /** Parse an instance of NetworkFlowInstance from the given String */ public static NetworkFlowInstance parse(String inpt) throws gen.ParseException{ return new gen.TheParser(new java.io.StringReader(inpt)).parse_NetworkFlowInstance(); } /** Parse an instance of NetworkFlowInstance from the given Stream */ public static NetworkFlowInstance parse(java.io.InputStream inpt) throws gen.ParseException{ return new gen.TheParser(inpt).parse_NetworkFlowInstance(); } /** Parse an instance of NetworkFlowInstance from the given Reader */ public static NetworkFlowInstance parse(java.io.Reader inpt) throws gen.ParseException{ return new gen.TheParser(inpt).parse_NetworkFlowInstance(); } /** Field Class for NetworkFlowInstance.g */ public static class g extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for NetworkFlowInstance.source */ public static class source extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for NetworkFlowInstance.sink */ public static class sink extends edu.neu.ccs.demeterf.Fields.any{} /** DGP method from Class Display */ public String display(){ return gen.Display.DisplayM(this); } /** DGP method from Class Print */ public String print(){ return gen.Print.PrintM(this); } /** DGP method from Class ToStr */ public String toStr(){ return gen.ToStr.ToStrM(this); } /** Updater for field NetworkFlowInstance.g */ public NetworkFlowInstance updateG(EdgeLabeledGraph> _g){ return new NetworkFlowInstance(_g, source, sink); } /** Updater for field NetworkFlowInstance.source */ public NetworkFlowInstance updateSource(Node _source){ return new NetworkFlowInstance(g, _source, sink); } /** Updater for field NetworkFlowInstance.sink */ public NetworkFlowInstance updateSink(Node _sink){ return new NetworkFlowInstance(g, source, _sink); } /** Getter for field NetworkFlowInstance.g */ public EdgeLabeledGraph> getG(){ return g; } /** Getter for field NetworkFlowInstance.source */ public Node getSource(){ return source; } /** Getter for field NetworkFlowInstance.sink */ public Node getSink(){ return sink; } }