/** * Returns true if grouping is used in this format. For example, in the * en_US locale, with grouping on, the number 1234567 will be formatted * as "1,234,567". The grouping separator as well as the size of each group * is locale-dependent and is determined by subclasses of NumberFormat. * Grouping affects both parsing and formatting. * @return true if grouping is used * @see #setGroupingUsed * @stable ICU 2.0 */ public boolean isGroupingUsed() { return numberFormat.isGroupingUsed(); }
@Override public boolean isGroupingUsed() { return fJdkNfmt.isGroupingUsed(); }
/** * Returns true if grouping is used in this format. For example, in the * en_US locale, with grouping on, the number 1234567 will be formatted * as "1,234,567". The grouping separator as well as the size of each group * is locale-dependent and is determined by subclasses of NumberFormat. * Grouping affects both parsing and formatting. * @return true if grouping is used * @see #setGroupingUsed * @stable ICU 2.0 */ public boolean isGroupingUsed() { return numberFormat.isGroupingUsed(); }
/** * Returns the value of the grouping flag for the current number format. * * @return The grouping flag. */ public boolean isGroupingUsed() { return getNumberFormat().isGroupingUsed(); }
/** * Returns the value of the grouping flag for the current number format. * * @return The grouping flag. */ public boolean isGroupingUsed() { return getNumberFormat().isGroupingUsed(); }
@Override public boolean equals(Object obj) { if (obj == null) return false; if (this == obj) return true; if (getClass() != obj.getClass()) return false; NumberFormat that = (NumberFormat) obj; return ( getMaximumIntegerDigits() == that.getMaximumIntegerDigits() && getMinimumIntegerDigits() == that.getMinimumIntegerDigits() && getMaximumFractionDigits() == that.getMaximumFractionDigits() && getMinimumFractionDigits() == that.getMinimumFractionDigits() && isGroupingUsed() == that.isGroupingUsed() && isParseIntegerOnly() == that.isParseIntegerOnly() ); }
NumberFormat nf = getConverter().getNumberFormat(locale); if (nf != null) { useGrouping = nf.isGroupingUsed();
private ULCNumberDataType createDecimalDataType( IDecimalPropertyDescriptor propertyDescriptor, Locale locale, NumberFormat format) { ULCNumberDataType numberDataType = new ULCNumberDataType(locale); if (propertyDescriptor.getMaxFractionDigit() != null) { numberDataType.setMaxFractionDigits(propertyDescriptor .getMaxFractionDigit().intValue()); } numberDataType.setMin(propertyDescriptor.getMinValue()); numberDataType.setMax(propertyDescriptor.getMaxValue()); numberDataType.setGroupingUsed(format.isGroupingUsed()); return numberDataType; }
NumberFormat nf = ((StringToNumberConverter<?>) getInternalField().getConverter()).getNumberFormat(locale); if (nf != null) { useGrouping = nf.isGroupingUsed();
private ULCNumberDataType createIntegerDataType( IIntegerPropertyDescriptor propertyDescriptor, Locale locale, NumberFormat format) { ULCNumberDataType numberDataType = new ULCNumberDataType(locale); numberDataType.setInteger(true); numberDataType.setMin(propertyDescriptor.getMinValue()); numberDataType.setMax(propertyDescriptor.getMaxValue()); numberDataType.setMaxFractionDigits(0); numberDataType.setMinFractionDigits(0); numberDataType.setGroupingUsed(format.isGroupingUsed()); return numberDataType; }
final NumberFormat numberFormat = NumberFormat.getInstance(authenticationContext.getLocale()); String groupingSeparator = ""; if (numberFormat.isGroupingUsed() && numberFormat instanceof DecimalFormat) { groupingSeparator = "" + ((DecimalFormat) numberFormat).getDecimalFormatSymbols().getGroupingSeparator();