Interface PatternConsumer

All Known Implementing Classes:

public interface PatternConsumer

This interface is used to connect the XML pattern file parser to the hyphenation tree. This class has been taken from the Apache FOP project ( They have been slightly modified.

Method Summary
 void addClass(String chargroup)
          Add a character class.
 void addException(String word, ArrayList<Object> hyphenatedword)
          Add a hyphenation exception.
 void addPattern(String pattern, String values)
          Add hyphenation patterns.

Method Detail


void addClass(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.

chargroup - character group


void addException(String word,
                  ArrayList<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 and Hyphen instances


void addPattern(String pattern,
                String values)
Add hyphenation patterns.

pattern - the pattern
values - interletter values expressed as a string of digit characters.

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.