Class TextHyphenator
- java.lang.Object
-
- org.teichert.databaseexplorer.hyphen.AbstractHyphenator
-
- org.teichert.databaseexplorer.hyphen.TextHyphenator
-
- All Implemented Interfaces:
Hyphenator
public class TextHyphenator extends AbstractHyphenator
This Hyphenator adds soft hyphens (­
) where hyphens are can be placed. HTML-Tags are not hyphenated.
-
-
Field Summary
-
Fields inherited from class org.teichert.databaseexplorer.hyphen.AbstractHyphenator
pushCharCount, remainCharCount, tree
-
-
Constructor Summary
Constructors Constructor Description TextHyphenator(HyphenationTree tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendHyphenatedWord(StringBuilder result, StringBuilder wordBuffer, String hyphen)
Appends the content of wordBuffer to result and truncates the wordBuffer.protected void
appendTag(StringBuilder result, StringBuilder wordBuffer)
Appends the content of wordBuffer to result and truncates the wordBuffer.protected void
appendWord(StringBuilder result, StringBuilder wordBuffer)
Appends the content of wordBuffer to result and truncates the wordBuffer.String
getSplittedChars(String hyphen)
-
Methods inherited from class org.teichert.databaseexplorer.hyphen.AbstractHyphenator
hyphenateText
-
-
-
-
Constructor Detail
-
TextHyphenator
public TextHyphenator(HyphenationTree tree)
-
-
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 classAbstractHyphenator
- Parameters:
result
- output bufferwordBuffer
- 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 classAbstractHyphenator
- Parameters:
result
- output bufferwordBuffer
- 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 classAbstractHyphenator
- Parameters:
result
- output bufferwordBuffer
- buffered wordhyphen
- hyphen String eg."-"
or""
-
-