private RequestTemplate appendQuery(
      String name, Iterable<String> values, CollectionFormat collectionFormat) {
    if (!values.iterator().hasNext()) {
      /* empty value, clear the existing values */
      this.queries.remove(name);
      return this;
    }

    /* create a new query template out of the information here */
    this.queries.compute(
        name,
        (key, queryTemplate) -> {
          if (queryTemplate == null) {
            return QueryTemplate.create(
                name, values, this.charset, collectionFormat, this.decodeSlash);
          } else {
            return QueryTemplate.append(queryTemplate, values, collectionFormat, this.decodeSlash);
          }
        });
    return this;
  }
Appends the query name and values.

@param name of the parameter.
@param values for the parameter, may be expressions.
@param collectionFormat to use when resolving collection based query variables.
@return a RequestTemplate for chaining.
core/src/main/java/feign/RequestTemplate.java