Class Hyphenator


  • public class Hyphenator
    extends java.lang.Object
    This class is the main entry point to the hyphenation package. You can use only the static methods or create an instance.
    • Field Detail

      • hyphenTrees

        private static java.util.Hashtable hyphenTrees
        TODO: Don't use statics
      • remainCharCount

        private int remainCharCount
      • pushCharCount

        private int pushCharCount
      • defaultHyphLocation

        private static final java.lang.String defaultHyphLocation
        See Also:
        Constant Field Values
      • hyphenDir

        private static java.lang.String hyphenDir
        Holds value of property hyphenDir.
    • Constructor Detail

      • Hyphenator

        public Hyphenator​(java.lang.String lang,
                          java.lang.String country,
                          int leftMin,
                          int rightMin)
        Parameters:
        lang - language to set
        country - country to set
        leftMin - left minimum to set
        rightMin - right minimum to set
    • Method Detail

      • getHyphenationTree

        private static HyphenationTree getHyphenationTree​(java.lang.String lang,
                                                          java.lang.String country)
        Parameters:
        lang -
        country -
        Returns:
        the hyphenation tree
      • getResourceHyphenationTree

        private static HyphenationTree getResourceHyphenationTree​(java.lang.String key)
        Parameters:
        key -
        Returns:
        a hyphenation tree
      • getFileHyphenationTree

        private static HyphenationTree getFileHyphenationTree​(java.lang.String key)
        Parameters:
        key -
        Returns:
        a hyphenation tree
      • setMinRemainCharCount

        public void setMinRemainCharCount​(int min)
        Parameters:
        min - minimum to set
      • setMinPushCharCount

        public void setMinPushCharCount​(int min)
        Parameters:
        min - minimum to set
      • hyphenate

        public Hyphenation hyphenate​(java.lang.String word)
        Parameters:
        word - word to set
        Returns:
        a hyphenation object