code: private static String getListPropertyValue(
        String varName,
        Iterator<?> iterator,
        boolean containsExplodeModifier,
        CompositeOutput compositeOutput) {
      if (!iterator.hasNext()) {
        return "";
      }
      StringBuilder retBuf = new StringBuilder();
      String joiner;
      if (containsExplodeModifier) {
        joiner = compositeOutput.getExplodeJoiner();
      } else {
        joiner = COMPOSITE_NON_EXPLODE_JOINER;
        if (compositeOutput.requiresVarAssignment()) {
          retBuf.append(CharEscapers.escapeUriPath(varName));
          retBuf.append("=");
        }
      }
      while (iterator.hasNext()) {
        if (containsExplodeModifier && compositeOutput.requiresVarAssignment()) {
          retBuf.append(CharEscapers.escapeUriPath(varName));
          retBuf.append("=");
        }
        retBuf.append(compositeOutput.getEncodedValue(iterator.next().toString()));
        if (iterator.hasNext()) {
          retBuf.append(joiner);
        }
      }
      return retBuf.toString();
    }
docs: Expand the template of a composite list property. Eg: If d := ["red", "green", "blue"] then
  {/d*} is expanded to "/red/green/blue"
  
  @param varName The name of the variable the value corresponds to. Eg: "d"
  @param iterator The iterator over list values. Eg: ["red", "green", "blue"]
  @param containsExplodeModifier Set to true if the template contains the explode modifier "*"
  @param compositeOutput An instance of CompositeOutput. Contains information on how the
  expansion should be done
  @return The expanded list template
  @throws IllegalArgumentException if the required list path parameter is empty