public static String messagesToString ( final Set < String > messages ) { final SafeHtmlBuilder sb = new SafeHtmlBuilder ( ) ; for ( final String message : messages ) { sb . appendEscaped ( message ) ; sb . appendEscaped ( "\n" ) ; } return sb . toSafeHtml ( ) . asString ( ) ; }
build a linefeed separated String with all messages out of given set .