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

package hsr;

import edu.neu.ccs.demeterf.lib.*;
import edu.neu.ccs.demeterf.lib.*;
import scg.*;





/** Representation of HSRSolution */
public abstract class HSRSolution implements SolutionI{

    /** Construct a(n) HSRSolution Instance */
    public HSRSolution(){
    }
    /** Parse an instance of HSRSolution from the given String */
    public static HSRSolution parse(String inpt) throws hsr.ParseException{
        return new hsr.TheParser(new java.io.StringReader(inpt)).parse_HSRSolution();
    }
    /** Parse an instance of HSRSolution from the given Stream */
    public static HSRSolution parse(java.io.InputStream inpt) throws hsr.ParseException{
        return new hsr.TheParser(inpt).parse_HSRSolution();
    }
    /** Parse an instance of HSRSolution from the given Reader */
    public static HSRSolution parse(java.io.Reader inpt) throws hsr.ParseException{
        return new hsr.TheParser(inpt).parse_HSRSolution();
    }


	/** Find the depth of the Binary tree **/
	public int findDepth(){
		int depth = 0;

		if(this instanceof Compound){
			depth = Math.max(((Compound)this).getYes().findDepth(), ((Compound)this).getNo().findDepth()) +1;
		}

		return depth;
	}

    /** DGP method from Class Display */
    public String display(){ return hsr.Display.DisplayM(this); }
    /** DGP method from Class Print */
    public String print(){ return hsr.Print.PrintM(this); }
    /** DGP method from Class ToStr */
    public String toStr(){ return hsr.ToStr.ToStrM(this); }
    /** DGP method from Class PrintToString */
    public String toString(){ return hsr.PrintToString.PrintToStringM(this); }
    /** DGP method from Class HashCode */
    public int hashCode(){ return hsr.HashCode.HashCodeM(this); }

}


