com.greenpepper.confluence.utils.HtmlUtils Maven / Gradle / Ivy
package com.greenpepper.confluence.utils;
import java.util.Set;
/**
* HtmlUtils class.
*
* @author oaouattara
* @version $Id: $Id
*/
public class HtmlUtils {
private final static String TEXTAREA_ELEMENTS_SEPARATOR = "\n";
/**
* stringSetToTextArea.
*
* @param elements a {@link java.util.Set} object.
* @return a {@link java.lang.String} object.
*/
public static String stringSetToTextArea(Set elements) {
StringBuilder sb = new StringBuilder();
if (elements != null) {
for (String element : elements) {
sb.append(element);
sb.append(TEXTAREA_ELEMENTS_SEPARATOR);
}
}
int length = sb.length();
return sb.substring(0, length > 0 ? length - 1 : 0);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy