From 9e823a1055ee983974ffdf8f43aa6d318025b69e Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Sat, 2 Oct 2010 17:48:07 +0000 Subject: [PATCH] Remove unused methods from Hyphenator; this leaves a utility class git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1003845 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/hyphenation/Hyphenator.java | 66 +------------------ 1 file changed, 1 insertion(+), 65 deletions(-) diff --git a/src/java/org/apache/fop/hyphenation/Hyphenator.java b/src/java/org/apache/fop/hyphenation/Hyphenator.java index 3c7c0a43c..7dab56c98 100644 --- a/src/java/org/apache/fop/hyphenation/Hyphenator.java +++ b/src/java/org/apache/fop/hyphenation/Hyphenator.java @@ -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); - } - } -- 2.39.5