code: public static String toSeparatedString(List<?> values, String separator, String prefix) {
          StringBuilder result = new StringBuilder();
          for (Object each : values) {
              if (each == null) {
                  continue;
              }
              if (result.length() > 0) {
                  result.append(separator);
              }
              if (prefix != null) {
                  result.append(String.valueOf(each));
              } else {
                  result.append(prefix + String.valueOf(each));
              }
          }
          return result.toString();
      }
docs: build a single String from a List of objects with a given separator and prefix
  
  @param values
  @param separator
  @param prefix
  @return