// ** This class was generated with DemFGen (vers:09/12/2009) package gen; import java.io.FileInputStream; import edu.neu.ccs.demeterf.lib.*; /** Representation of Belief */ public class Belief{ protected final Predicate predicate; protected final float fraction; /** Construct a(n) Belief Instance */ public Belief(Predicate predicate, float fraction){ this.predicate = predicate; this.fraction = fraction; } /** Is the given object Equal to this Belief? */ public boolean equals(Object o){ if(!(o instanceof Belief))return false; if(o == this)return true; Belief oo = (Belief)o; return (((Object)predicate).equals(oo.predicate))&&(((Object)fraction).equals(oo.fraction)); } /** Parse an instance of Belief from the given String */ public static Belief parse(String inpt) throws ParseException{ return new TheParser(new java.io.StringReader(inpt)).parse_Belief(); } /** Parse an instance of Belief from the given Stream */ public static Belief parse(java.io.InputStream inpt) throws ParseException{ return new TheParser(inpt).parse_Belief(); } /** Parse an instance of Belief from the given Reader */ public static Belief parse(java.io.Reader inpt) throws ParseException{ return new TheParser(inpt).parse_Belief(); } /** Field Class for Belief.predicate */ public static class predicate extends edu.neu.ccs.demeterf.control.Fields.any{} /** Field Class for Belief.fraction */ public static class fraction extends edu.neu.ccs.demeterf.control.Fields.any{} /** DGP method from Class ToStr */ public String toStr(){ return gen.ToStr.ToStrM(this); } /** DGP method from Class Print */ public String print(){ return gen.Print.PrintM(this); } /** DGP method from Class Display */ public String display(){ return gen.Display.DisplayM(this); } }