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, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hyphenate
private 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 Hyphenator
text
- 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)
Hyphenator
text
from start
to end
. BreakIterator.getWordInstance(Locale)
for word-separation.hyphenate
in interface Hyphenator
text
- 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()
Hyphenator
Locale
this Hyphenator
works for. It may differ from (be more general than)
the Locale
this Hyphenator
was requested for
.getLocale
in interface Hyphenator
Locale
.HyphenatorBuilder.getHyphenator(Locale)
public char getHyphen()
Hyphenator
Locale
s.getHyphen
in interface Hyphenator
Copyright © 2001–2016 mmm-Team. All rights reserved.