@Ignore("non-determinism between OpenJDK versions") @Test public void parseTest() throws java.text.ParseException { BtcFormat us = BtcFormat.getSymbolInstance(Locale.US); BtcFormat usCoded = BtcFormat.getCodeInstance(Locale.US); assertEquals(valueOf(200000000), us.parseObject("BTC2")); assertEquals(valueOf(200000000), us.parseObject("XBT2")); assertEquals(valueOf(200000000), us.parseObject("฿2")); assertEquals(valueOf(200000000), us.parseObject("Ƀ2")); assertEquals(valueOf(200000000), us.parseObject("2")); assertEquals(valueOf(200000000), usCoded.parseObject("BTC 2")); assertEquals(valueOf(200000000), usCoded.parseObject("XBT 2")); assertEquals(valueOf(200000000), us.parseObject("฿2.0")); assertEquals(valueOf(200000000), us.parseObject("Ƀ2.0")); assertEquals(valueOf(200000000), us.parseObject("2.0")); assertEquals(valueOf(200000000), us.parseObject("BTC2.0")); assertEquals(valueOf(200000000), us.parseObject("XBT2.0")); assertEquals(valueOf(200000000), usCoded.parseObject("฿ 2")); assertEquals(valueOf(200000000), usCoded.parseObject("Ƀ 2")); assertEquals(valueOf(200000000), usCoded.parseObject(" 2")); assertEquals(valueOf(200000000), usCoded.parseObject("BTC 2")); assertEquals(valueOf(200000000), usCoded.parseObject("XBT 2")); assertEquals(valueOf(202222420000000L), us.parseObject("2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("฿2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("Ƀ2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("BTC2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("XBT2,022,224.20")); assertEquals(valueOf(220200000000L), us.parseObject("2,202.0")); assertEquals(valueOf(2100000000000000L), us.parseObject("21000000.00000000")); assertEquals(valueOf(200000), usCoded.parseObject("mBTC 2")); assertEquals(valueOf(200000), usCoded.parseObject("mXBT 2")); assertEquals(valueOf(200000), usCoded.parseObject("m฿ 2")); assertEquals(valueOf(200000), usCoded.parseObject("mɃ 2")); assertEquals(valueOf(200000), us.parseObject("mBTC2")); assertEquals(valueOf(200000), us.parseObject("mXBT2")); assertEquals(valueOf(200000), us.parseObject("₥฿2")); assertEquals(valueOf(200000), us.parseObject("₥Ƀ2")); assertEquals(valueOf(200000), us.parseObject("₥2")); assertEquals(valueOf(200000), usCoded.parseObject("₥BTC 2.00")); assertEquals(valueOf(200000), usCoded.parseObject("₥XBT 2.00")); assertEquals(valueOf(200000), usCoded.parseObject("₥BTC 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥XBT 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥฿ 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥Ƀ 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥ 2")); assertEquals(valueOf(202222400000L), us.parseObject("₥฿2,022,224")); assertEquals(valueOf(202222420000L), us.parseObject("₥Ƀ2,022,224.20")); assertEquals(valueOf(202222400000L), us.parseObject("m฿2,022,224")); assertEquals(valueOf(202222420000L), us.parseObject("mɃ2,022,224.20")); assertEquals(valueOf(202222400000L), us.parseObject("₥BTC2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("₥XBT2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("mBTC2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("mXBT2,022,224")); assertEquals(valueOf(202222420000L), us.parseObject("₥2,022,224.20")); assertEquals(valueOf(202222400000L), usCoded.parseObject("₥฿ 2,022,224")); assertEquals(valueOf(202222420000L), usCoded.parseObject("₥Ƀ 2,022,224.20")); assertEquals(valueOf(202222400000L), usCoded.parseObject("m฿ 2,022,224")); assertEquals(valueOf(202222420000L), usCoded.parseObject("mɃ 2,022,224.20")); assertEquals(valueOf(202222400000L), usCoded.parseObject("₥BTC 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("₥XBT 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("mBTC 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("mXBT 2,022,224")); assertEquals(valueOf(202222420000L), usCoded.parseObject("₥ 2,022,224.20")); assertEquals(valueOf(435), us.parseObject("µ฿4.35")); assertEquals(valueOf(435), us.parseObject("uɃ4.35")); assertEquals(valueOf(435), us.parseObject("u฿4.35")); assertEquals(valueOf(435), us.parseObject("µɃ4.35")); assertEquals(valueOf(435), us.parseObject("uBTC4.35")); assertEquals(valueOf(435), us.parseObject("uXBT4.35")); assertEquals(valueOf(435), us.parseObject("µBTC4.35")); assertEquals(valueOf(435), us.parseObject("µXBT4.35")); assertEquals(valueOf(435), usCoded.parseObject("uBTC 4.35")); assertEquals(valueOf(435), usCoded.parseObject("uXBT 4.35")); assertEquals(valueOf(435), usCoded.parseObject("µBTC 4.35")); assertEquals(valueOf(435), usCoded.parseObject("µXBT 4.35")); assertEquals(valueOf(435), us.parseObject("uBTC4.345")); assertEquals(valueOf(435), us.parseObject("uXBT4.345")); assertEquals(valueOf(-1), usCoded.parseObject("(µ฿ 0.01)")); assertEquals(valueOf(-10), us.parseObject("(µBTC0.100)")); assertEquals(valueOf(-10), us.parseObject("(µXBT0.100)")); us = BtcFormat.builder().locale(US).style(SYMBOL).symbol("£").code("XYZ").build(); usCoded = BtcFormat.builder().locale(US).scale(0).symbol("£").code("XYZ"). pattern("¤ #,##0.00").build(); assertEquals(valueOf(200000000), us.parseObject("XYZ2")); assertEquals(valueOf(200000000), us.parseObject("BTC2")); assertEquals(valueOf(200000000), us.parseObject("XBT2")); assertEquals(valueOf(200000000), us.parseObject("£2")); assertEquals(valueOf(200000000), us.parseObject("฿2")); assertEquals(valueOf(200000000), us.parseObject("Ƀ2")); assertEquals(valueOf(200000000), us.parseObject("2")); assertEquals(valueOf(200000000), usCoded.parseObject("XYZ 2")); assertEquals(valueOf(200000000), usCoded.parseObject("BTC 2")); assertEquals(valueOf(200000000), usCoded.parseObject("XBT 2")); assertEquals(valueOf(200000000), us.parseObject("£2.0")); assertEquals(valueOf(200000000), us.parseObject("฿2.0")); assertEquals(valueOf(200000000), us.parseObject("Ƀ2.0")); assertEquals(valueOf(200000000), us.parseObject("2.0")); assertEquals(valueOf(200000000), us.parseObject("XYZ2.0")); assertEquals(valueOf(200000000), us.parseObject("BTC2.0")); assertEquals(valueOf(200000000), us.parseObject("XBT2.0")); assertEquals(valueOf(200000000), usCoded.parseObject("£ 2")); assertEquals(valueOf(200000000), usCoded.parseObject("฿ 2")); assertEquals(valueOf(200000000), usCoded.parseObject("Ƀ 2")); assertEquals(valueOf(200000000), usCoded.parseObject(" 2")); assertEquals(valueOf(200000000), usCoded.parseObject("XYZ 2")); assertEquals(valueOf(200000000), usCoded.parseObject("BTC 2")); assertEquals(valueOf(200000000), usCoded.parseObject("XBT 2")); assertEquals(valueOf(202222420000000L), us.parseObject("2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("£2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("฿2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("Ƀ2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("XYZ2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("BTC2,022,224.20")); assertEquals(valueOf(202222420000000L), us.parseObject("XBT2,022,224.20")); assertEquals(valueOf(220200000000L), us.parseObject("2,202.0")); assertEquals(valueOf(2100000000000000L), us.parseObject("21000000.00000000")); assertEquals(valueOf(200000), usCoded.parseObject("mXYZ 2")); assertEquals(valueOf(200000), usCoded.parseObject("mBTC 2")); assertEquals(valueOf(200000), usCoded.parseObject("mXBT 2")); assertEquals(valueOf(200000), usCoded.parseObject("m£ 2")); assertEquals(valueOf(200000), usCoded.parseObject("m฿ 2")); assertEquals(valueOf(200000), usCoded.parseObject("mɃ 2")); assertEquals(valueOf(200000), us.parseObject("mXYZ2")); assertEquals(valueOf(200000), us.parseObject("mBTC2")); assertEquals(valueOf(200000), us.parseObject("mXBT2")); assertEquals(valueOf(200000), us.parseObject("₥£2")); assertEquals(valueOf(200000), us.parseObject("₥฿2")); assertEquals(valueOf(200000), us.parseObject("₥Ƀ2")); assertEquals(valueOf(200000), us.parseObject("₥2")); assertEquals(valueOf(200000), usCoded.parseObject("₥XYZ 2.00")); assertEquals(valueOf(200000), usCoded.parseObject("₥BTC 2.00")); assertEquals(valueOf(200000), usCoded.parseObject("₥XBT 2.00")); assertEquals(valueOf(200000), usCoded.parseObject("₥XYZ 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥BTC 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥XBT 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥£ 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥฿ 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥Ƀ 2")); assertEquals(valueOf(200000), usCoded.parseObject("₥ 2")); assertEquals(valueOf(202222400000L), us.parseObject("₥£2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("₥฿2,022,224")); assertEquals(valueOf(202222420000L), us.parseObject("₥Ƀ2,022,224.20")); assertEquals(valueOf(202222400000L), us.parseObject("m£2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("m฿2,022,224")); assertEquals(valueOf(202222420000L), us.parseObject("mɃ2,022,224.20")); assertEquals(valueOf(202222400000L), us.parseObject("₥XYZ2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("₥BTC2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("₥XBT2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("mXYZ2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("mBTC2,022,224")); assertEquals(valueOf(202222400000L), us.parseObject("mXBT2,022,224")); assertEquals(valueOf(202222420000L), us.parseObject("₥2,022,224.20")); assertEquals(valueOf(202222400000L), usCoded.parseObject("₥£ 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("₥฿ 2,022,224")); assertEquals(valueOf(202222420000L), usCoded.parseObject("₥Ƀ 2,022,224.20")); assertEquals(valueOf(202222400000L), usCoded.parseObject("m£ 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("m฿ 2,022,224")); assertEquals(valueOf(202222420000L), usCoded.parseObject("mɃ 2,022,224.20")); assertEquals(valueOf(202222400000L), usCoded.parseObject("₥XYZ 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("₥BTC 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("₥XBT 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("mXYZ 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("mBTC 2,022,224")); assertEquals(valueOf(202222400000L), usCoded.parseObject("mXBT 2,022,224")); assertEquals(valueOf(202222420000L), usCoded.parseObject("₥ 2,022,224.20")); assertEquals(valueOf(435), us.parseObject("µ£4.35")); assertEquals(valueOf(435), us.parseObject("µ฿4.35")); assertEquals(valueOf(435), us.parseObject("uɃ4.35")); assertEquals(valueOf(435), us.parseObject("u£4.35")); assertEquals(valueOf(435), us.parseObject("u฿4.35")); assertEquals(valueOf(435), us.parseObject("µɃ4.35")); assertEquals(valueOf(435), us.parseObject("uXYZ4.35")); assertEquals(valueOf(435), us.parseObject("uBTC4.35")); assertEquals(valueOf(435), us.parseObject("uXBT4.35")); assertEquals(valueOf(435), us.parseObject("µXYZ4.35")); assertEquals(valueOf(435), us.parseObject("µBTC4.35")); assertEquals(valueOf(435), us.parseObject("µXBT4.35")); assertEquals(valueOf(435), usCoded.parseObject("uXYZ 4.35")); assertEquals(valueOf(435), usCoded.parseObject("uBTC 4.35")); assertEquals(valueOf(435), usCoded.parseObject("uXBT 4.35")); assertEquals(valueOf(435), usCoded.parseObject("µXYZ 4.35")); assertEquals(valueOf(435), usCoded.parseObject("µBTC 4.35")); assertEquals(valueOf(435), usCoded.parseObject("µXBT 4.35")); assertEquals(valueOf(435), us.parseObject("uXYZ4.345")); assertEquals(valueOf(435), us.parseObject("uBTC4.345")); assertEquals(valueOf(435), us.parseObject("uXBT4.345")); assertEquals(valueOf(-1), usCoded.parseObject("µ£ -0.01")); assertEquals(valueOf(-1), usCoded.parseObject("µ฿ -0.01")); assertEquals(valueOf(-10), us.parseObject("(µXYZ0.100)")); assertEquals(valueOf(-10), us.parseObject("(µBTC0.100)")); assertEquals(valueOf(-10), us.parseObject("(µXBT0.100)")); try { BtcFormat.getInstance().parse("abc"); fail("bad parse must raise exception"); } catch (ParseException e) {} }
public Coin parse(String source, ParsePosition pos) { DecimalFormatSymbols anteSigns = null; int parseScale = COIN_SCALE; Coin coin = null; synchronized (numberFormat) { if (numberFormat.toPattern().contains("¤")) { for(ScaleMatcher d : denomMatchers()) { Matcher matcher = d.pattern.matcher(source); if (matcher.find()) { anteSigns = setSymbolAndCode(numberFormat, matcher.group()); parseScale = d.scale; break; } } if (parseScale == COIN_SCALE) { Matcher matcher = coinPattern.matcher(source); matcher.find(); anteSigns = setSymbolAndCode(numberFormat, matcher.group()); } } else parseScale = scale(); Number number = numberFormat.parse(source, pos); if (number != null) try { coin = Coin.valueOf( ((BigDecimal)number).movePointRight(offSatoshis(parseScale)).setScale(0, HALF_UP).longValue() ); } catch (IllegalArgumentException e) { pos.setIndex(0); } if (anteSigns != null) numberFormat.setDecimalFormatSymbols(anteSigns); } return coin; }
BtcFormat extends Format { public Coin parse(String source, ParsePosition pos) { DecimalFormatSymbols anteSigns = null; int parseScale = COIN_SCALE; Coin coin = null; synchronized (numberFormat) { if (numberFormat.toPattern().contains("¤")) { for(ScaleMatcher d : denomMatchers()) { Matcher matcher = d.pattern.matcher(source); if (matcher.find()) { anteSigns = setSymbolAndCode(numberFormat, matcher.group()); parseScale = d.scale; break; } } if (parseScale == COIN_SCALE) { Matcher matcher = coinPattern.matcher(source); matcher.find(); anteSigns = setSymbolAndCode(numberFormat, matcher.group()); } } else parseScale = scale(); Number number = numberFormat.parse(source, pos); if (number != null) try { coin = Coin.valueOf( ((BigDecimal)number).movePointRight(offSatoshis(parseScale)).setScale(0, HALF_UP).longValue() ); } catch (IllegalArgumentException e) { pos.setIndex(0); } if (anteSigns != null) numberFormat.setDecimalFormatSymbols(anteSigns); } return coin; } }
BtcFormat extends Format { public Coin parse(String source, ParsePosition pos) { DecimalFormatSymbols anteSigns = null; int parseScale = COIN_SCALE; Coin coin = null; synchronized (numberFormat) { if (numberFormat.toPattern().contains("¤")) { for(ScaleMatcher d : denomMatchers()) { Matcher matcher = d.pattern.matcher(source); if (matcher.find()) { anteSigns = setSymbolAndCode(numberFormat, matcher.group()); parseScale = d.scale; break; } } if (parseScale == COIN_SCALE) { Matcher matcher = coinPattern.matcher(source); matcher.find(); anteSigns = setSymbolAndCode(numberFormat, matcher.group()); } } else parseScale = scale(); Number number = numberFormat.parse(source, pos); if (number != null) try { coin = Coin.valueOf( ((BigDecimal)number).movePointRight(offSatoshis(parseScale)).setScale(0, HALF_UP).longValue() ); } catch (IllegalArgumentException e) { pos.setIndex(0); } if (anteSigns != null) numberFormat.setDecimalFormatSymbols(anteSigns); } return coin; } protected  BtcFormat(DecimalFormat numberFormat, int minDecimals, List<Integer> groups); }
BtcFormat extends Format { public Coin parse(String source, ParsePosition pos) { DecimalFormatSymbols anteSigns = null; int parseScale = COIN_SCALE; Coin coin = null; synchronized (numberFormat) { if (numberFormat.toPattern().contains("¤")) { for(ScaleMatcher d : denomMatchers()) { Matcher matcher = d.pattern.matcher(source); if (matcher.find()) { anteSigns = setSymbolAndCode(numberFormat, matcher.group()); parseScale = d.scale; break; } } if (parseScale == COIN_SCALE) { Matcher matcher = coinPattern.matcher(source); matcher.find(); anteSigns = setSymbolAndCode(numberFormat, matcher.group()); } } else parseScale = scale(); Number number = numberFormat.parse(source, pos); if (number != null) try { coin = Coin.valueOf( ((BigDecimal)number).movePointRight(offSatoshis(parseScale)).setScale(0, HALF_UP).longValue() ); } catch (IllegalArgumentException e) { pos.setIndex(0); } if (anteSigns != null) numberFormat.setDecimalFormatSymbols(anteSigns); } return coin; } protected  BtcFormat(DecimalFormat numberFormat, int minDecimals, List<Integer> groups); static Builder builder(); static BtcFormat getInstance(); static BtcFormat getSymbolInstance(); static BtcFormat getCodeInstance(); static BtcFormat getSymbolInstance(int fractionPlaces); static BtcFormat getCodeInstance(int minDecimals); static BtcFormat getInstance(Locale locale); static BtcFormat getCodeInstance(Locale locale); static BtcFormat getInstance(Locale locale, int minDecimals); static BtcFormat getCodeInstance(Locale locale, int minDecimals); static BtcFormat getSymbolInstance(Locale locale); static BtcFormat getSymbolInstance(Locale locale, int fractionPlaces); static BtcFormat getInstance(Style style); static BtcFormat getInstance(Style style, int fractionPlaces); static BtcFormat getInstance(Style style, Locale locale); static BtcFormat getInstance(Style style, Locale locale, int fractionPlaces); static BtcFormat getCoinInstance(); static BtcFormat getCoinInstance(int minFractionPlaces, int... groups); static BtcFormat getCoinInstance(Locale locale); static BtcFormat getCoinInstance(Locale locale, int scale, int... groups); static BtcFormat getMilliInstance(); static BtcFormat getMilliInstance(Locale locale); static BtcFormat getMilliInstance(int scale, int... groups); static BtcFormat getMilliInstance(Locale locale, int scale, int... groups); static BtcFormat getMicroInstance(); static BtcFormat getMicroInstance(Locale locale); static BtcFormat getMicroInstance(int scale, int... groups); static BtcFormat getMicroInstance(Locale locale, int scale, int... groups); static BtcFormat getInstance(int scale, int minDecimals, int... groups); static BtcFormat getInstance(int scale); static BtcFormat getInstance(int scale, Locale locale); static BtcFormat getInstance(int scale, Locale locale, int minDecimals, int... groups); static BtcFormat getInstance(int scale, Locale locale, int minDecimals, List<Integer> groups); @Override AttributedCharacterIterator formatToCharacterIterator(Object obj); @Override StringBuffer format(Object qty, StringBuffer toAppendTo, FieldPosition pos); String format(Object qty, int minDecimals, int... fractionGroups); StringBuffer format(Object qty, StringBuffer toAppendTo, FieldPosition pos,
                                            int minDecimals, int... fractionGroups); @Override final Object parseObject(String source, ParsePosition pos); Coin parse(String source, ParsePosition pos); Coin parse(String source); static Locale[] getAvailableLocales(); String coinSymbol(); String coinCode(); String pattern(); DecimalFormatSymbols symbols(); @Override boolean equals(Object o); @Override int hashCode(); }
BtcFormat extends Format { public Coin parse(String source, ParsePosition pos) { DecimalFormatSymbols anteSigns = null; int parseScale = COIN_SCALE; Coin coin = null; synchronized (numberFormat) { if (numberFormat.toPattern().contains("¤")) { for(ScaleMatcher d : denomMatchers()) { Matcher matcher = d.pattern.matcher(source); if (matcher.find()) { anteSigns = setSymbolAndCode(numberFormat, matcher.group()); parseScale = d.scale; break; } } if (parseScale == COIN_SCALE) { Matcher matcher = coinPattern.matcher(source); matcher.find(); anteSigns = setSymbolAndCode(numberFormat, matcher.group()); } } else parseScale = scale(); Number number = numberFormat.parse(source, pos); if (number != null) try { coin = Coin.valueOf( ((BigDecimal)number).movePointRight(offSatoshis(parseScale)).setScale(0, HALF_UP).longValue() ); } catch (IllegalArgumentException e) { pos.setIndex(0); } if (anteSigns != null) numberFormat.setDecimalFormatSymbols(anteSigns); } return coin; } protected  BtcFormat(DecimalFormat numberFormat, int minDecimals, List<Integer> groups); static Builder builder(); static BtcFormat getInstance(); static BtcFormat getSymbolInstance(); static BtcFormat getCodeInstance(); static BtcFormat getSymbolInstance(int fractionPlaces); static BtcFormat getCodeInstance(int minDecimals); static BtcFormat getInstance(Locale locale); static BtcFormat getCodeInstance(Locale locale); static BtcFormat getInstance(Locale locale, int minDecimals); static BtcFormat getCodeInstance(Locale locale, int minDecimals); static BtcFormat getSymbolInstance(Locale locale); static BtcFormat getSymbolInstance(Locale locale, int fractionPlaces); static BtcFormat getInstance(Style style); static BtcFormat getInstance(Style style, int fractionPlaces); static BtcFormat getInstance(Style style, Locale locale); static BtcFormat getInstance(Style style, Locale locale, int fractionPlaces); static BtcFormat getCoinInstance(); static BtcFormat getCoinInstance(int minFractionPlaces, int... groups); static BtcFormat getCoinInstance(Locale locale); static BtcFormat getCoinInstance(Locale locale, int scale, int... groups); static BtcFormat getMilliInstance(); static BtcFormat getMilliInstance(Locale locale); static BtcFormat getMilliInstance(int scale, int... groups); static BtcFormat getMilliInstance(Locale locale, int scale, int... groups); static BtcFormat getMicroInstance(); static BtcFormat getMicroInstance(Locale locale); static BtcFormat getMicroInstance(int scale, int... groups); static BtcFormat getMicroInstance(Locale locale, int scale, int... groups); static BtcFormat getInstance(int scale, int minDecimals, int... groups); static BtcFormat getInstance(int scale); static BtcFormat getInstance(int scale, Locale locale); static BtcFormat getInstance(int scale, Locale locale, int minDecimals, int... groups); static BtcFormat getInstance(int scale, Locale locale, int minDecimals, List<Integer> groups); @Override AttributedCharacterIterator formatToCharacterIterator(Object obj); @Override StringBuffer format(Object qty, StringBuffer toAppendTo, FieldPosition pos); String format(Object qty, int minDecimals, int... fractionGroups); StringBuffer format(Object qty, StringBuffer toAppendTo, FieldPosition pos,
                                            int minDecimals, int... fractionGroups); @Override final Object parseObject(String source, ParsePosition pos); Coin parse(String source, ParsePosition pos); Coin parse(String source); static Locale[] getAvailableLocales(); String coinSymbol(); String coinCode(); String pattern(); DecimalFormatSymbols symbols(); @Override boolean equals(Object o); @Override int hashCode(); static final int COIN_SCALE; static final int MILLICOIN_SCALE; static final int MICROCOIN_SCALE; }