class HeaderTemplate extends Template {

  public static HeaderTemplate create(String name, Iterable<String> values) {
    if (name == null || name.isEmpty()) {
      throw new IllegalArgumentException("name is required.");
    }

    if (values == null) {
      throw new IllegalArgumentException("values are required");
    }

    /* construct a uri template from the name and values */
    StringBuilder template = new StringBuilder();
    template.append(name)
        .append(" ");

    /* create a comma separated template for the header values */
    Iterator<String> iterator = values.iterator();
    while (iterator.hasNext()) {
      template.append(iterator.next());
      if (iterator.hasNext()) {
        template.append(",");
      }
    }
    return new HeaderTemplate(template.toString(), name, values, Util.UTF_8);
  }

  private  HeaderTemplate(String template, String name, Iterable<String> values, Charset charset);
  private  HeaderTemplate(String name, Charset charset, List<TemplateChunk> chunks);

}