Class AbstractHyphenator

    • Field Detail

      • remainCharCount

        protected final int remainCharCount
      • pushCharCount

        protected final int pushCharCount
    • Constructor Detail

      • AbstractHyphenator

        protected AbstractHyphenator​(HyphenationTree tree)
      • AbstractHyphenator

        protected AbstractHyphenator​(HyphenationTree tree,
                                     int remainCharCount,
                                     int pushCharCount)
    • Method Detail

      • appendWord

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

        protected abstract 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.
        Parameters:
        result - output buffer
        wordBuffer - buffered word
      • appendHyphenatedWord

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