Package org.apache.fop.hyphenation
Class Hyphenator
- java.lang.Object
-
- org.apache.fop.hyphenation.Hyphenator
-
public final class Hyphenator extends Object
This class is the main entry point to the hyphenation package. You can use only the static methods or create an instance.
This work was authored by Carlos Villegas (cav@uniscope.co.jp).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HyphenationTree
getHyphenationTree(String lang, String country)
Returns a hyphenation tree for a given language and country, with fallback from (lang,country) to (lang).static Hyphenation
hyphenate(String lang, String country, String word, int leftMin, int rightMin)
Hyphenates a word.static boolean
isNotCached(String lang, String country)
-
-
-
Method Detail
-
hyphenate
public static Hyphenation hyphenate(String lang, String country, String word, int leftMin, int rightMin)
Hyphenates a word.- Parameters:
lang
- the languagecountry
- the optional country code (may be null or "none")word
- the word to hyphenateleftMin
- the minimum number of characters before the hyphenation pointrightMin
- the minimum number of characters after the hyphenation point- Returns:
- the hyphenation result
-
getHyphenationTree
public static HyphenationTree getHyphenationTree(String lang, String country)
Returns a hyphenation tree for a given language and country, with fallback from (lang,country) to (lang). The hyphenation trees are cached.- Parameters:
lang
- the languagecountry
- the country (may be null or "none")- Returns:
- the hyphenation tree
-
-