* 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
*/
* <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 {
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.
}
/**
- * 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];
+ }
}
}