MCPcopy Index your code
hub / github.com/bitcoinj/bitcoinj / format

Method format

core/src/main/java/org/bitcoinj/utils/BtcFormat.java:1149–1152  ·  view source on GitHub ↗

Formats a bitcoin value as a number and possibly a units indicator and appends the resulting text to the given string buffer. The type of monetary value argument can be any one of any of the following classes: Coin, Integer, Long, BigInteger, BigDecimal. Num

(Object qty, StringBuffer toAppendTo, FieldPosition pos)

Source from the content-addressed store, hash-verified

1147 * @return the {@link StringBuffer} passed in as {@code toAppendTo}
1148 */
1149 @Override
1150 public StringBuffer format(Object qty, StringBuffer toAppendTo, FieldPosition pos) {
1151 return format(qty, toAppendTo, pos, minimumFractionDigits, decimalGroups);
1152 }
1153
1154 /**
1155 * Formats a bitcoin value as a number and possibly a units indicator to a

Callers 15

prefixTestMethod · 0.95
suffixTestMethod · 0.95
symbolCollisionTestMethod · 0.95
argumentTypeTestMethod · 0.95
columnAlignmentTestMethod · 0.95
repeatingPlaceTestMethod · 0.95
parsePositionTestMethod · 0.95
currencyCodeTestMethod · 0.95
coinScaleTestMethod · 0.95
millicoinScaleTestMethod · 0.95
microcoinScaleTestMethod · 0.95
testGroupingMethod · 0.95

Calls 8

boxAsListMethod · 0.95
denominateAndRoundMethod · 0.95
inSatoshisMethod · 0.95
setFormatterDigitsMethod · 0.95
checkArgumentMethod · 0.80
getMethod · 0.65
toStringMethod · 0.45
scaleMethod · 0.45

Tested by 15

prefixTestMethod · 0.76
suffixTestMethod · 0.76
symbolCollisionTestMethod · 0.76
argumentTypeTestMethod · 0.76
columnAlignmentTestMethod · 0.76
repeatingPlaceTestMethod · 0.76
parsePositionTestMethod · 0.76
currencyCodeTestMethod · 0.76
coinScaleTestMethod · 0.76
millicoinScaleTestMethod · 0.76
microcoinScaleTestMethod · 0.76
testGroupingMethod · 0.76