Lines Matching defs:formatWidth

124     private final transient FormatWidth formatWidth;
206 * Create a format from the locale, formatWidth, and format.
209 * @param formatWidth hints how long formatted strings should be.
212 public static MeasureFormat getInstance(ULocale locale, FormatWidth formatWidth) {
213 return getInstance(locale, formatWidth, NumberFormat.getInstance(locale));
217 * Create a format from the {@link java.util.Locale} and formatWidth.
220 * @param formatWidth hints how long formatted strings should be.
223 public static MeasureFormat getInstance(Locale locale, FormatWidth formatWidth) {
224 return getInstance(ULocale.forLocale(locale), formatWidth);
228 * Create a format from the locale, formatWidth, and format.
231 * @param formatWidth hints how long formatted strings should be.
235 public static MeasureFormat getInstance(ULocale locale, FormatWidth formatWidth, NumberFormat format) {
243 if (formatWidth == FormatWidth.NUMERIC) {
257 formatWidth,
261 new ImmutableNumberFormat(NumberFormat.getInstance(locale, formatWidth.getCurrencyStyle())),
266 * Create a format from the {@link java.util.Locale}, formatWidth, and format.
269 * @param formatWidth hints how long formatted strings should be.
273 public static MeasureFormat getInstance(Locale locale, FormatWidth formatWidth, NumberFormat format) {
274 return getInstance(ULocale.forLocale(locale), formatWidth, format);
414 String rangeFormatter = getRangeFormat(getLocale(), formatWidth);
439 getPluralFormatter(lowValue.getUnit(), formatWidth, resolvedPlural.ordinal());
457 int currentStyle = formatWidth.getCurrencyStyle();
527 if (formatWidth == FormatWidth.NUMERIC) {
537 getLocale(), formatWidth.getListFormatterStyle());
563 FormatWidth width = getRegularWidth(formatWidth);
581 * Two MeasureFormats, a and b, are equal if and only if they have the same formatWidth,
613 return formatWidth;
669 this.formatWidth,
680 FormatWidth formatWidth,
688 this.formatWidth = formatWidth;
699 this.formatWidth = null;
1025 getFormatterOrNull(perUnit, formatWidth, MeasureFormatData.PER_UNIT_INDEX);
1030 String perPattern = getPerFormatter(formatWidth);
1031 String pattern = getPluralFormatter(perUnit, formatWidth, StandardPlural.ONE.ordinal());
1062 String formatter = getPluralFormatter(unit, formatWidth, pluralForm.ordinal());
1153 return new MeasureProxy(getLocale(), formatWidth, numberFormat.get(), TIME_UNIT_FORMAT);
1157 return new MeasureProxy(getLocale(), formatWidth, numberFormat.get(), CURRENCY_FORMAT);
1351 getLocale(), formatWidth, numberFormat.get(), MEASURE_FORMAT);
1358 private FormatWidth formatWidth;
1369 this.formatWidth = width;
1382 out.writeByte(formatWidth.ordinal());
1392 formatWidth = fromFormatWidthOrdinal(in.readByte() & 0xFF);
1409 if (formatWidth == FormatWidth.WIDE) {
1411 } else if (formatWidth == FormatWidth.SHORT) {
1414 throw new InvalidObjectException("Bad width: " + formatWidth);
1424 return MeasureFormat.getInstance(locale, formatWidth, numberFormat);