/** * Adds a new Structure (group or segment) to this Group. A place for the Structure is added to * the group but there are initially zero repetitions. This method should be used by the * constructors of implementing classes to specify which Structures the Group contains - * Structures should be added in the order in which they appear. Note that the class is supplied * instead of an instance because we want there initially to be zero instances of each structure * but we want the AbstractGroup code to be able to create instances as necessary to support * get(...) calls. * * @return the actual name used to store this structure (may be appended with an integer if * there are duplicates in the same Group). */ protected String add(Class<? extends Structure> c, boolean required, boolean repeating) throws HL7Exception { return add(c, required, repeating, false); }
/** * Adds a new Structure (group or segment) to this Group. A place for the Structure is added to * the group but there are initially zero repetitions. This method should be used by the * constructors of implementing classes to specify which Structures the Group contains - * Structures should be added in the order in which they appear. Note that the class is supplied * instead of an instance because we want there initially to be zero instances of each structure * but we want the AbstractGroup code to be able to create instances as necessary to support * get(...) calls. * * @return the actual name used to store this structure (may be appended with an integer if * there are duplicates in the same Group). */ protected String add(Class<? extends Structure> c, boolean required, boolean repeating) throws HL7Exception { return add(c, required, repeating, false); }