Interface PatternConsumer
-
- All Known Implementing Classes:
HyphenationTree
public interface PatternConsumerThis interface is used to connect the XML pattern file parser to the hyphenation tree. This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddClass(java.lang.String chargroup)Add a character class.voidaddException(java.lang.String word, java.util.ArrayList<java.lang.Object> hyphenatedword)Add a hyphenation exception.voidaddPattern(java.lang.String pattern, java.lang.String values)Add hyphenation patterns.
-
-
-
Method Detail
-
addClass
void addClass(java.lang.String chargroup)
Add a character class. A character class defines characters that are considered equivalent for the purpose of hyphenation (e.g. "aA"). It usually means to ignore case.- Parameters:
chargroup- character group
-
addException
void addException(java.lang.String word, java.util.ArrayList<java.lang.Object> hyphenatedword)Add a hyphenation exception. An exception replaces the result obtained by the algorithm for cases for which this fails or the user wants to provide his own hyphenation. A hyphenatedword is a vector of alternating String's andHypheninstances
-
addPattern
void addPattern(java.lang.String pattern, java.lang.String values)Add hyphenation patterns.- Parameters:
pattern- the patternvalues- interletter values expressed as a string of digit characters.
-
-