All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.siftscience.StringUtils Maven / Gradle / Ivy

There is a newer version: 3.16.0
Show newest version
package com.siftscience;

import java.util.Collection;

final class StringUtils {

    private StringUtils() {

    }

    static String joinWithComma(Collection elements) {
        if (elements == null || elements.isEmpty()) {
            return "";
        }
        StringBuilder sb = new StringBuilder();
        for (Object o: elements) {
            sb.append(',');
            sb.append(o.toString());
        }
        return sb.substring(1, sb.length());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy