@Test public void withGroupingSeparator() { final MonetaryFormat monetaryFormat = new MonetaryFormat() .noCode().minDecimals(2).optionalDecimals().withGroupingSeparator(); assertEquals("123,456.78", monetaryFormat.format(Coin.valueOf(123456,78)).toString()); assertEquals("1,234.56", monetaryFormat.format(Coin.valueOf(1234,56)).toString()); assertEquals("1,234.00", monetaryFormat.format(Coin.valueOf(1234, 00)).toString()); assertEquals("1.234,00", monetaryFormat.withLocale(Locale.GERMANY) .format(Coin.valueOf(1234, 00)).toString()); assertEquals("123.45", monetaryFormat.format(Coin.valueOf(123,45)).toString()); assertEquals("12.34", monetaryFormat.format(Coin.valueOf(12,34)).toString()); }
public MonetaryFormat withGroupingSeparator() { return new MonetaryFormat(locale, negativeSign, positiveSign, zeroDigit, decimalMark, true, minDecimals, decimalGroups, shift, roundingMode, codes, codeSeparator, codePrefixed); }
MonetaryFormat { public MonetaryFormat withGroupingSeparator() { return new MonetaryFormat(locale, negativeSign, positiveSign, zeroDigit, decimalMark, true, minDecimals, decimalGroups, shift, roundingMode, codes, codeSeparator, codePrefixed); } }
MonetaryFormat { public MonetaryFormat withGroupingSeparator() { return new MonetaryFormat(locale, negativeSign, positiveSign, zeroDigit, decimalMark, true, minDecimals, decimalGroups, shift, roundingMode, codes, codeSeparator, codePrefixed); } MonetaryFormat();  MonetaryFormat(boolean useBitcoinSymbol); private  MonetaryFormat(Locale locale, char negativeSign, char positiveSign, char zeroDigit,
                           char decimalMark, boolean showGroupingSeparator, int minDecimals,
                           List<Integer> decimalGroups, int shift, RoundingMode roundingMode,
                           String[] codes, char codeSeparator, boolean codePrefixed); }
MonetaryFormat { public MonetaryFormat withGroupingSeparator() { return new MonetaryFormat(locale, negativeSign, positiveSign, zeroDigit, decimalMark, true, minDecimals, decimalGroups, shift, roundingMode, codes, codeSeparator, codePrefixed); } MonetaryFormat();  MonetaryFormat(boolean useBitcoinSymbol); private  MonetaryFormat(Locale locale, char negativeSign, char positiveSign, char zeroDigit,
                           char decimalMark, boolean showGroupingSeparator, int minDecimals,
                           List<Integer> decimalGroups, int shift, RoundingMode roundingMode,
                           String[] codes, char codeSeparator, boolean codePrefixed); MonetaryFormat negativeSign(char negativeSign); MonetaryFormat positiveSign(char positiveSign); MonetaryFormat digits(char zeroDigit); MonetaryFormat decimalMark(char decimalMark); MonetaryFormat minDecimals(int minDecimals); MonetaryFormat optionalDecimals(int... groups); MonetaryFormat repeatOptionalDecimals(int decimals, int repetitions); MonetaryFormat shift(int shift); MonetaryFormat roundingMode(RoundingMode roundingMode); MonetaryFormat noCode(); MonetaryFormat code(int codeShift, String code); MonetaryFormat codeSeparator(char codeSeparator); MonetaryFormat prefixCode(); MonetaryFormat postfixCode(); MonetaryFormat withLocale(Locale locale); MonetaryFormat withGroupingSeparator(); CharSequence format(Monetary monetary); Coin parse(String str); Fiat parseFiat(String currencyCode, String str); String code(); @Override boolean equals(final Object o); @Override int hashCode(); }
MonetaryFormat { public MonetaryFormat withGroupingSeparator() { return new MonetaryFormat(locale, negativeSign, positiveSign, zeroDigit, decimalMark, true, minDecimals, decimalGroups, shift, roundingMode, codes, codeSeparator, codePrefixed); } MonetaryFormat();  MonetaryFormat(boolean useBitcoinSymbol); private  MonetaryFormat(Locale locale, char negativeSign, char positiveSign, char zeroDigit,
                           char decimalMark, boolean showGroupingSeparator, int minDecimals,
                           List<Integer> decimalGroups, int shift, RoundingMode roundingMode,
                           String[] codes, char codeSeparator, boolean codePrefixed); MonetaryFormat negativeSign(char negativeSign); MonetaryFormat positiveSign(char positiveSign); MonetaryFormat digits(char zeroDigit); MonetaryFormat decimalMark(char decimalMark); MonetaryFormat minDecimals(int minDecimals); MonetaryFormat optionalDecimals(int... groups); MonetaryFormat repeatOptionalDecimals(int decimals, int repetitions); MonetaryFormat shift(int shift); MonetaryFormat roundingMode(RoundingMode roundingMode); MonetaryFormat noCode(); MonetaryFormat code(int codeShift, String code); MonetaryFormat codeSeparator(char codeSeparator); MonetaryFormat prefixCode(); MonetaryFormat postfixCode(); MonetaryFormat withLocale(Locale locale); MonetaryFormat withGroupingSeparator(); CharSequence format(Monetary monetary); Coin parse(String str); Fiat parseFiat(String currencyCode, String str); String code(); @Override boolean equals(final Object o); @Override int hashCode(); static final MonetaryFormat BTC; static final MonetaryFormat MBTC; static final MonetaryFormat UBTC; static final MonetaryFormat FIAT; static final String CODE_BTC; static final String CODE_MBTC; static final String CODE_UBTC; static final String SYMBOL_BTC; static final String SYMBOL_MBTC; static final String SYMBOL_UBTC; static final int MAX_DECIMALS; }