code: private void buildFunGroups(List<AttachedGroup> attachedGroups) {
          Iterator<AttachedGroup> groupsIterator = attachedGroups.iterator();
          while (groupsIterator.hasNext()) {
              AttachedGroup attachedGroup = groupsIterator.next();
  
              Iterator<Token> locationsIterator = attachedGroup.getLocations().iterator();
              while (locationsIterator.hasNext()) {
                  Token locationToken = locationsIterator.next();
                  addFunGroup(attachedGroup.getName(), Integer.parseInt(locationToken.image) - 1);
              }
          }
      }
docs: Initiates the building of the molecules functional group(s).
  Adds the functional group to atom 0 if only one group exists or runs
  down the list of positions adding groups as required.
  
  @param attachedGroups A vector of AttachedGroup's representing functional groups.
  @see #addFunGroup