src/main/java/com/zandero/utils/StringUtils.java
public static String join(Set<?> items, String separator, Integer limit) {

		if (separator == null || separator.equalsIgnoreCase("")) {
			throw new IllegalArgumentException("Missing separator!");
		}

		if (items != null && items.size() > 0) {
			Object[] array = items.toArray();
			return join(array, separator, limit);
		}

		return "";
	}
public static String join(Set<?> items, String separator, Integer limit) {

		if (separator == null || separator.equalsIgnoreCase("")) {
			throw new IllegalArgumentException("Missing separator!");
		}

		if (items != null && items.size() > 0) {
			Object[] array = items.toArray();
			return join(array, separator, limit);
		}

		return "";
	}
Joins list of string items to a single string, where items are separated
with a defined separator.

@param items     to join into string
@param separator to be used between elements
@param limit     max items to consider when joining, null or 0 to join all
@return items joined into a single string