out.println("  void clear"+toClassName(name)+"();"); out.println("  boolean removeFrom"+toClassName(name)+"("+etype+" _element);"); out.println("  boolean addTo"+toClassName(name)+"("+etype+" _element);");
println(out,"  void clear"+toClassName(name)+"();"); println(out,"  boolean removeFrom"+toClassName(name)+"("+etype+" _element);"); println(out,"  boolean addTo"+toClassName(name)+"("+etype+" _element);");
    void writeSetterIfc(PrintWriter out, String context, String className) {      out.println("/** Additional methods for "+className);      out.println(" * offering mutators (set methods) for the object's owner");      out.println(" **/");      out.println();      doPackaging(out, context);      String importstr=(String)p.get(context,"import");      if (importstr!=null) {        Vector v = explode(importstr, ',');        Enumeration ves = v.elements();        while (ves.hasMoreElements()) {          String ve=(String)ves.nextElement();          out.println("import "+ve+";");        }      }      out.println();      String newclassName = "New"+className;      // figure out what we're supposed to extend      String extendstring;      if (p.get(context, PGParser.TIMEPHASED) == null) {        extendstring = "extends "+className+ ", NewPropertyGroup";      } else {        extendstring = "extends "+className+ ", NewTimePhasedPropertyGroup";      }            if (hasDQ(context)) {     // if the class has it, we need to implement the getter        extendstring = extendstring+ ", org.cougaar.domain.planning.ldm.dq.HasDataQuality";      }      out.println("public interface "+newclassName+" "+extendstring+" {");      // declare the slots      Vector slotspecs = getAllSlotSpecs(context);      Enumeration se = slotspecs.elements();      while (se.hasMoreElements()) {        String slotspec = ((String)se.nextElement()).trim();        int s = slotspec.indexOf(" ");        String type = slotspec.substring(0,s);        String name = slotspec.substring(s+1);        ActiveSlot as = parseActiveSlot(slotspec);        if (as != null) {          name = as.name;        }        String etype = null;        CollectionType ct = parseCollectionType(type);        if (ct != null) {          type = ct.ctype;          etype = ct.etype;        }                String depp = (String)p.get(context,name+".deprecated");        if (depp != null)           out.println("  /** @deprecated "+depp+" **/");        if (as != null) {          out.println("  void "+as.setterSpec()+";");        } else {          out.println("  void set"+toClassName(name)+"("+                      type+" "+name+");");        }        // mutators for collection types        if (etype != null) {          out.println("  void clear"+toClassName(name)+"();");          out.println("  boolean removeFrom"+toClassName(name)+"("+etype+" _element);");          out.println("  boolean addTo"+toClassName(name)+"("+etype+" _element);");        }        if (as != null) {          // handler installation method          String htype = as.handlerName();          out.println("  void set"+htype+"("+className+"."+htype+" handler);");          out.println("  "+className+"."+htype+" get"+htype+"();");        }      }      // delegation      {        Vector v = getAllDelegateSpecs(context);        if (v != null) {          for (int i =0; i<v.size(); i++) {            Argument dv = (Argument) v.elementAt(i);                        // define delegate getter and setter if non-automatic            String autop = (String)p.get(context, dv.name+".auto");            // if it isn't automatic, define the setter and getter            if (!(autop != null && Boolean.valueOf(autop).booleanValue())) {              out.println("  public "+dv.type+" get"+toClassName(dv.name)+"();");              out.println("  public void set"+toClassName(dv.name)+"("+dv.type+" _"+dv.name+");");            }                      }        }      }      out.println("}");    }