// ** This file was generated with DemFGen (vers:12/15/2010) package gen; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; /** Representation of Activity */ public class Activity extends Work{ protected final List composedOf; /** Construct a(n) Activity Instance */ public Activity(List composedOf, Option d, Option slackTime, TeamName assigned, WorkName workName){ super(d, slackTime, assigned, workName); this.composedOf = composedOf; } /** Is the given object Equal to this Activity? */ public boolean equals(Object o){ if(!(o instanceof Activity))return false; if(o == this)return true; Activity oo = (Activity)o; return (((Object)composedOf).equals(oo.composedOf))&&(((Object)d).equals(oo.d))&&(((Object)slackTime).equals(oo.slackTime))&&(((Object)assigned).equals(oo.assigned))&&(((Object)workName).equals(oo.workName)); } /** Parse an instance of Activity from the given String */ public static Activity parse(String inpt) throws gen.ParseException{ return new gen.TheParser(new java.io.StringReader(inpt)).parse_Activity(); } /** Parse an instance of Activity from the given Stream */ public static Activity parse(java.io.InputStream inpt) throws gen.ParseException{ return new gen.TheParser(inpt).parse_Activity(); } /** Parse an instance of Activity from the given Reader */ public static Activity parse(java.io.Reader inpt) throws gen.ParseException{ return new gen.TheParser(inpt).parse_Activity(); } /** Field Class for Activity.composedOf */ public static class composedOf 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 Activity.composedOf */ public Activity updateComposedOf(List _composedOf){ return new Activity(_composedOf, d, slackTime, assigned, workName); } /** Updater for field Activity.d */ public Activity updateD(Option _d){ return new Activity(composedOf, _d, slackTime, assigned, workName); } /** Updater for field Activity.slackTime */ public Activity updateSlackTime(Option _slackTime){ return new Activity(composedOf, d, _slackTime, assigned, workName); } /** Updater for field Activity.assigned */ public Activity updateAssigned(TeamName _assigned){ return new Activity(composedOf, d, slackTime, _assigned, workName); } /** Updater for field Activity.workName */ public Activity updateWorkName(WorkName _workName){ return new Activity(composedOf, d, slackTime, assigned, _workName); } /** Getter for field Activity.composedOf */ public List getComposedOf(){ return composedOf; } /** Getter for field Activity.d */ public Option getD(){ return d; } /** Getter for field Activity.slackTime */ public Option getSlackTime(){ return slackTime; } /** Getter for field Activity.assigned */ public TeamName getAssigned(){ return assigned; } /** Getter for field Activity.workName */ public WorkName getWorkName(){ return workName; } }