Author: spepping
Date: Sat Oct  2 17:48:07 2010
New Revision: 1003845

URL: http://svn.apache.org/viewvc?rev=1003845&view=rev
Log:
Remove unused methods from Hyphenator; this leaves a utility class

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java?rev=1003845&r1=1003844&r2=1003845&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java 
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java 
Sat Oct  2 17:48:07 2010
@@ -47,25 +47,13 @@ public class Hyphenator {
 
     private static HyphenationTreeCache hTreeCache = null;
 
-    private HyphenationTree hyphenTree = null;
-    private int remainCharCount = 2;
-    private int pushCharCount = 2;
     /** Enables a dump of statistics. Note: If activated content is sent to 
System.out! */
     private static boolean statisticsDump = false;
 
     /**
      * Creates a new hyphenator.
-     * @param lang the language
-     * @param country the country (may be null or "none")
-     * @param leftMin the minimum number of characters before the hyphenation 
point
-     * @param rightMin the minimum number of characters after the hyphenation 
point
      */
-    public Hyphenator(String lang, String country, int leftMin,
-                      int rightMin) {
-        hyphenTree = getHyphenationTree(lang, country);
-        remainCharCount = leftMin;
-        pushCharCount = rightMin;
-    }
+    private Hyphenator() { }
 
     /** @return the default (static) hyphenation tree cache */
     public static synchronized HyphenationTreeCache getHyphenationTreeCache() {
@@ -414,56 +402,4 @@ public class Hyphenator {
         return hyphenate(lang, country, null, null, word, offset, len, 
leftMin, rightMin);
     }
 
-    /**
-     * Sets the minimum number of characters before the hyphenation point
-     * @param min the number of characters
-     */
-    public void setMinRemainCharCount(int min) {
-        remainCharCount = min;
-    }
-
-    /**
-     * Sets the minimum number of characters after the hyphenation point
-     * @param min the number of characters
-     */
-    public void setMinPushCharCount(int min) {
-        pushCharCount = min;
-    }
-
-    /**
-     * Sets the language and country for the hyphenation process.
-     * @param lang the language
-     * @param country the country (may be null or "none")
-     */
-    public void setLanguage(String lang, String country) {
-        hyphenTree = getHyphenationTree(lang, country);
-    }
-
-    /**
-     * Hyphenates a word.
-     * @param word the word to hyphenate
-     * @param offset the offset of the first character in the "word" character 
array
-     * @param len the length of the word
-     * @return the hyphenation result
-     */
-    public Hyphenation hyphenate(char[] word, int offset, int len) {
-        if (hyphenTree == null) {
-            return null;
-        }
-        return hyphenTree.hyphenate(word, offset, len, remainCharCount,
-                                    pushCharCount);
-    }
-
-    /**
-     * Hyphenates a word.
-     * @param word the word to hyphenate
-     * @return the hyphenation result
-     */
-    public Hyphenation hyphenate(String word) {
-        if (hyphenTree == null) {
-            return null;
-        }
-        return hyphenTree.hyphenate(word, remainCharCount, pushCharCount);
-    }
-
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to