]> granicus.if.org Git - icu/commitdiff
ICU-10268 Make formatMeasures methods be together.
authorTravis Keep <keep94@gmail.com>
Tue, 17 Dec 2013 01:23:49 +0000 (01:23 +0000)
committerTravis Keep <keep94@gmail.com>
Tue, 17 Dec 2013 01:23:49 +0000 (01:23 +0000)
X-SVN-Rev: 34782

icu4j/main/classes/core/src/com/ibm/icu/text/MeasureFormat.java

index 79c5fb883de4d13244cfb097d390651cdaf93deb..38b6d2a530676f53a51be2ddfaabd03c0bf71561 100644 (file)
@@ -192,26 +192,6 @@ public class MeasureFormat extends UFormat {
         return new MeasureFormat(locale, width, format, rules, unitToStyleToCountToFormat);
     }
     
-    /**
-     * Format a sequence of measures. Uses the ListFormatter unit lists.
-     * So, for example, one could format “3 feet, 2 inches”.
-     * Zero values are formatted (eg, “3 feet, 0 inches”). It is the caller’s
-     * responsibility to have the appropriate values in appropriate order,
-     * and using the appropriate Number values. Typically the units should be
-     * in descending order, with all but the last Measure having integer values
-     * (eg, not “3.2 feet, 2 inches”).
-     * 
-     * @param measures a sequence of one or more measures.
-     * @return the formatted string.
-     * @draft ICU 53
-     * @provisional
-     */
-    public String formatMeasures(Measure... measures) {
-        StringBuilder result = this.formatMeasures(
-                new StringBuilder(), new FieldPosition(0), measures);
-        return result.toString();
-    }
-    
     /**
      * Able to format Collection&lt;? extends Measure&gt;, Measure[], and Measure
      * by delegating to formatMeasure or formatMeasures.
@@ -303,6 +283,26 @@ public class MeasureFormat extends UFormat {
         }
     }
     
+    /**
+     * Format a sequence of measures. Uses the ListFormatter unit lists.
+     * So, for example, one could format “3 feet, 2 inches”.
+     * Zero values are formatted (eg, “3 feet, 0 inches”). It is the caller’s
+     * responsibility to have the appropriate values in appropriate order,
+     * and using the appropriate Number values. Typically the units should be
+     * in descending order, with all but the last Measure having integer values
+     * (eg, not “3.2 feet, 2 inches”).
+     * 
+     * @param measures a sequence of one or more measures.
+     * @return the formatted string.
+     * @draft ICU 53
+     * @provisional
+     */
+    public String formatMeasures(Measure... measures) {
+        StringBuilder result = this.formatMeasures(
+                new StringBuilder(), new FieldPosition(0), measures);
+        return result.toString();
+    }
+    
     /**
      * Formats a sequence of measures and adds to appendable.
      * If the fieldPosition argument identifies a field used by the format,