public abstract class AbstractHyphenator extends AbstractLoggableComponent implements Hyphenator
Hyphenator interface.| Modifier and Type | Field and Description |
|---|---|
private char |
hyphen |
private Locale |
locale |
| Constructor and Description |
|---|
AbstractHyphenator(Locale locale,
char hyphen)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
char |
getHyphen()
This method gets the character used to separate the hyphenated parts of a word.
|
Locale |
getLocale()
This method gets the
Locale this Hyphenator works for. |
Hyphenation |
hyphenate(String text,
int start) |
Hyphenation |
hyphenate(String text,
int start,
int end)
This method hyphenates the word from the given
text from start to end. |
createLogger, doInitialize, getLoggerdoInitialized, getInitializationState, initializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithyphenateprivate final Locale locale
private final char hyphen
public AbstractHyphenator(Locale locale, char hyphen)
locale - is the locale.hyphen - is the hyphen-character.public Hyphenation hyphenate(String text, int start)
hyphenate in interface Hyphenatortext - is the text ending with the word to hyphenate.start - is the index of the words first character.Hyphenation for the word given by text.substring(start)Hyphenator.hyphenate(String, int, int)public Hyphenation hyphenate(String text, int start, int end)
Hyphenatortext from start to end. BreakIterator.getWordInstance(Locale) for word-separation.hyphenate in interface Hyphenatortext - is the text containing the word to hyphenate.start - is the index of the words first character.end - is the exclusive end-index. The index of the words last character is
end - 1.Hyphenation for the word given by text.substring(start, end)public Locale getLocale()
HyphenatorLocale this Hyphenator works for. It may differ from (be more general than)
the Locale this Hyphenator was requested for.getLocale in interface HyphenatorLocale.HyphenatorBuilder.getHyphenator(Locale)public char getHyphen()
HyphenatorLocales.getHyphen in interface HyphenatorCopyright © 2001–2016 mmm-Team. All rights reserved.