code: public static String join(Collection<?> collection, String delimiter){
          if(collection.size() == 0) return "";
          return collection
                      .stream()
                      .filter(o -> o != null)
                      .map(o -> o.toString())
                      .collect(Collectors.joining(delimiter));
      }
docs: Joins the items in collection with a delimiter.
  
  @param collection - collection of items to join.
  @param delimiter delimiter to insert between elements of collection.
  @return string with collection elements separated by delimiter. There is no trailing delimiter in the string.