commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject svn commit: r419738 - /jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/VariableFormatter.java
Date Thu, 06 Jul 2006 23:27:57 GMT
Author: scolebourne
Date: Thu Jul  6 16:27:57 2006
New Revision: 419738

URL: http://svn.apache.org/viewvc?rev=419738&view=rev
Log:
Layout getters and setters in pairs to match general lang formatting

Modified:
    jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/VariableFormatter.java

Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/VariableFormatter.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/VariableFormatter.java?rev=419738&r1=419737&r2=419738&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/VariableFormatter.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/VariableFormatter.java
Thu Jul  6 16:27:57 2006
@@ -737,47 +737,11 @@
         return doReplace(data, 0, data.length, obj, priorVariables);
     }
 
-    /**
-     * Returns the escape character.
-     * 
-     * @return the character used for escaping variable references
-     */
-    public char getEscapeCharacter() {
-        return this.escapeCharacter;
-    }
-
     private int getLength(FieldPosition tok) {
         return tok.getEndIndex() - tok.getBeginIndex();
     }
 
     /**
-     * Returns the prefix for variables.
-     * 
-     * @return the prefix for variables
-     */
-    public String getVariablePrefix() {
-        return this.variablePrefix;
-    }
-
-    /**
-     * Gets the VariableResolver
-     * 
-     * @return the VariableResolver
-     */
-    public VariableResolver getVariableResolver() {
-        return this.variableResolver;
-    }
-
-    /**
-     * Returns the suffix for variables.
-     * 
-     * @return the suffix for variables
-     */
-    public String getVariableSuffix() {
-        return this.variableSuffix;
-    }
-
-    /**
      * Replaces the occurrences of all variables in the given source array by their current
values.
      * 
      * @param data
@@ -850,9 +814,20 @@
         return this.getVariableResolver().resolveVariable(name);
     }
 
+    //-----------------------------------------------------------------------
     /**
-     * Sets the escape character. If this character is placed before a variable reference
in the source text, this
-     * variable will be ignored.
+     * Returns the escape character.
+     * 
+     * @return the character used for escaping variable references
+     */
+    public char getEscapeCharacter() {
+        return this.escapeCharacter;
+    }
+
+    /**
+     * Sets the escape character.
+     * If this character is placed before a variable reference in the source
+     * text, this variable will be ignored.
      * 
      * @param escapeCharacter
      *            the escape character (0 for disabling escaping)
@@ -862,14 +837,23 @@
     }
 
     /**
+     * Returns the prefix for variables.
+     * 
+     * @return the prefix for variables
+     */
+    public String getVariablePrefix() {
+        return this.variablePrefix;
+    }
+
+    /**
      * Sets the prefix for variables.
      * 
      * @param variablePrefix
-     *            the prefix for variables
+     *            the prefix for variables, not null
      * @throws IllegalArgumentException
      *             if the prefix is <b>null</b>
      */
-    public void setVariablePrefix(String variablePrefix) throws IllegalArgumentException
{
+    public void setVariablePrefix(String variablePrefix) {
         if (variablePrefix == null) {
             throw new IllegalArgumentException("Variable prefix must not be null!");
         }
@@ -877,27 +861,46 @@
     }
 
     /**
-     * Sets the VariableResolver
+     * Returns the suffix for variables.
      * 
-     * @param variableResolver
-     *            the VariableResolver
+     * @return the suffix for variables
      */
-    public void setVariableResolver(VariableResolver variableResolver) {
-        this.variableResolver = variableResolver;
+    public String getVariableSuffix() {
+        return this.variableSuffix;
     }
 
     /**
      * Sets the suffix for variables
      * 
      * @param variableSuffix
-     *            the suffix for variables
+     *            the suffix for variables, not null
      * @throws IllegalArgumentException
      *             if the prefix is <b>null</b>
      */
-    public void setVariableSuffix(String variableSuffix) throws IllegalArgumentException
{
+    public void setVariableSuffix(String variableSuffix) {
         if (variableSuffix == null) {
             throw new IllegalArgumentException("Variable suffix must not be null!");
         }
         this.variableSuffix = variableSuffix;
     }
+
+    /**
+     * Gets the VariableResolver
+     * 
+     * @return the VariableResolver
+     */
+    public VariableResolver getVariableResolver() {
+        return this.variableResolver;
+    }
+
+    /**
+     * Sets the VariableResolver
+     * 
+     * @param variableResolver
+     *            the VariableResolver
+     */
+    public void setVariableResolver(VariableResolver variableResolver) {
+        this.variableResolver = variableResolver;
+    }
+
 }



---------------------------------------------------------------------
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