code: public static <T> String concatenate(Collection<T> values, String sepStr) {
          assert values != null;
          assert sepStr != null;
  
          // Watch for the empty case first.
          if (values.size() == 0) {
              return "";
          }
  
          // This handles any size >= 1.
          StringBuilder buffer = new StringBuilder();
          boolean bFirst = true;
          for (T value : values) {
              if (bFirst) {
                  bFirst = false;
              } else {
                  buffer.append(sepStr);
              }
              buffer.append(value.toString());
          }
          return buffer.toString();
      }
docs: Join together the objects in the given collection into a single string with values
  separated by the given separator. An empty collection returns an empty String. A
  collection with a single object returns the toString() of the given object.
  Otherwise, the toString() value of each object is concatenated in iteration order
  with the given separation string added between values (but not before the first
  value or after the last value).
  
  @param <T>       Type of object to concatenate.
  @param values    A Collection of objects.
  @param sepStr    Separator string to use between values.
  @return          The Strings concatenated together with the given separate string
  between values.