public String format(Comment comment) {
        if (comment == null) {
            return "";
        }

        StringBuilder sb = new StringBuilder();

        for (CommentElement e : comment) {
            if (e instanceof CommentText) {
                sb.append(renderText((CommentText) e));

            } else if (e instanceof InlineLink) {
                sb.append(renderLink((InlineLink) e));
    
            } else if (e instanceof InlineValue) {
                sb.append(renderValue((InlineValue) e));
    
            } else if (e instanceof InlineTag) {
                sb.append(renderTag((InlineTag) e));

            } else {
                sb.append(renderUnrecognized(e));
            }
        }

        return sb.toString();
    }
public String format ( Comment comment ) { if ( comment == null ) { return "" ; } StringBuilder sb = new StringBuilder ( ) ; for ( CommentElement e : comment ) { if ( e instanceof CommentText ) { sb . append ( renderText ( ( CommentText ) e ) ) ; } else if ( e instanceof InlineLink ) { sb . append ( renderLink ( ( InlineLink ) e ) ) ; } else if ( e instanceof InlineValue ) { sb . append ( renderValue ( ( InlineValue ) e ) ) ; } else if ( e instanceof InlineTag ) { sb . append ( renderTag ( ( InlineTag ) e ) ) ; } else { sb . append ( renderUnrecognized ( e ) ) ; } } return sb . toString ( ) ; }
Render the comment as an HTML String.

@param comment the comment to render (may be {@code null} in which case an empty string is returned)
@return the HTML String representation of the comment