]> granicus.if.org Git - icu/commitdiff
ICU-10646 Improve documentation.
authorTravis Keep <keep94@gmail.com>
Thu, 30 Jan 2014 18:44:46 +0000 (18:44 +0000)
committerTravis Keep <keep94@gmail.com>
Thu, 30 Jan 2014 18:44:46 +0000 (18:44 +0000)
X-SVN-Rev: 35039

icu4j/main/classes/core/src/com/ibm/icu/impl/SimplePatternFormatter.java
icu4j/main/classes/core/src/com/ibm/icu/text/QuantityFormatter.java

index f006bfeb4ef3b7a8d26e5938a99b09731b9e4cab..4a523adc3ef3272ceeaa543af8a50f33fe3cd83a 100644 (file)
@@ -132,8 +132,10 @@ public class SimplePatternFormatter {
      * Formats the given values.
      * 
      * @param appendTo the result appended here.
-     * @param offsets position of first value in result stored in offfsets[0];
-     *   second in offsets[1]; third in offsets[2] etc.
+     * @param offsets position of first value in appendTo stored in offfsets[0];
+     *   second in offsets[1]; third in offsets[2] etc. An offset of -1 means that the
+     *   corresponding value is not in appendTo. offsets.length and values.length may
+     *   differ. If caller is not interested in offsets, caller may pass null here.
      * @param values the values
      * @return appendTo
      */
index af6e3fab27395dad5cc0d79924db02e473bc90d7..e95a165094694b74eb5fbfbceb9e70208e12d62e 100644 (file)
@@ -18,7 +18,6 @@ import com.ibm.icu.impl.SimplePatternFormatter;
  * <p>
  * QuanitityFormatter appears here instead of in com.ibm.icu.impl because it depends on
  * PluralRules and DecimalFormat. It is package-protected as it is not meant for public use.
- * @author rocketman
  */
 class QuantityFormatter {
     
@@ -72,12 +71,6 @@ class QuantityFormatter {
             return this;
         }
 
-        private void ensureCapacity() {
-            if (templates == null) {
-                templates = new SimplePatternFormatter[MAX_INDEX];
-            }
-        }
-
         /**
          * Builds the new QuantityFormatter and resets this Builder to its initial state.
          * @return the new QuantityFormatter object.
@@ -94,12 +87,17 @@ class QuantityFormatter {
         }
 
         /**
-         * Resets this builder to its intitial state.
+         * Resets this builder to its initial state.
          */
         public Builder reset() {
             templates = null;
             return this;
-            
+        }
+        
+        private void ensureCapacity() {
+            if (templates == null) {
+                templates = new SimplePatternFormatter[MAX_INDEX];
+            }
         }
 
     }