commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anaximandro (Woody)" <agodinh...@globo.com>
Subject [i18n] suggestion patch
Date Tue, 01 Feb 2005 08:21:57 GMT
"final" enhancements
Index: LocalizedText.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons-sandbox/i18n/src/java/org/apache/commons/i18
n/LocalizedText.java,v
retrieving revision 1.1
diff -u -r1.1 LocalizedText.java
--- LocalizedText.java 4 Oct 2004 13:41:09 -0000 1.1
+++ LocalizedText.java 1 Feb 2005 03:16:21 -0000
@@ -25,29 +25,29 @@
 import java.util.Locale;

 public class LocalizedText extends LocalizedBundle {
-    public final static String TEXT = "text";
+    private static final String TEXT = "text";

-    public LocalizedText(String messageId) {
+    public LocalizedText(final String messageId) {
         super(messageId);
     }

-    public LocalizedText(String messageId, Object[] arguments) {
+    public LocalizedText(final String messageId, final Object[] arguments)
{
         super(messageId, arguments);
     }

     public String getText() throws MessageNotFoundException  {
-        return getText(TEXT, Locale.getDefault());
+        return getEntry(TEXT, Locale.getDefault());
     }

-    public String getText(Locale locale) throws MessageNotFoundException  {
-        return getText(TEXT, locale);
+    public String getText(final Locale locale) throws
MessageNotFoundException  {
+        return getEntry(TEXT, locale);
     }

-    public String getText(String defaultText) {
-        return getText(TEXT, defaultText, Locale.getDefault());
+    public String getText(final String defaultText) {
+        return getEntry(TEXT, defaultText, Locale.getDefault());
     }

-    public String getText(Locale locale, String defaultText) {
-        return getText(TEXT, defaultText, locale);
+    public String getText(final Locale locale, final String defaultText) {
+        return getEntry(TEXT, defaultText, locale);
     }
 }
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message