Class EscapingHyphenator

  • All Implemented Interfaces:
    Hyphenator

    public class EscapingHyphenator
    extends AbstractHyphenator
    This Hyphenator uses StringEscapeUtils.escapeHtml4(String) to escape words but excludes HTML-Tags from escaping.
    • Constructor Detail

    • Method Detail

      • appendWord

        protected void appendWord​(StringBuilder result,
                                  StringBuilder wordBuffer)
        Appends the content of wordBuffer to result and truncates the wordBuffer. The implementing method may modify the content.
        Specified by:
        appendWord in class AbstractHyphenator
        Parameters:
        result - output buffer
        wordBuffer - buffered word
      • appendTag

        protected void appendTag​(StringBuilder result,
                                 StringBuilder wordBuffer)
        Appends the content of wordBuffer to result and truncates the wordBuffer. The implementing method should not modify the content.
        Specified by:
        appendTag in class AbstractHyphenator
        Parameters:
        result - output buffer
        wordBuffer - buffered word
      • appendHyphenatedWord

        protected void appendHyphenatedWord​(StringBuilder result,
                                            StringBuilder wordBuffer,
                                            String hyphen)
        Appends the content of wordBuffer to result and truncates the wordBuffer.
        Specified by:
        appendHyphenatedWord in class AbstractHyphenator
        Parameters:
        result - output buffer
        wordBuffer - buffered word
        hyphen - hyphen String eg. "-" or "­"