public String format(Object qty, int minDecimals, int... fractionGroups) {
        return format(qty, new StringBuffer(), new FieldPosition(0), minDecimals, boxAsList(fractionGroups)).toString();
    }
public String format ( Object qty , int minDecimals , int ... fractionGroups ) { return format ( qty , new StringBuffer ( ) , new FieldPosition ( 0 ) , minDecimals , boxAsList ( fractionGroups ) ) . toString ( ) ; }
Formats a bitcoin value as a number and possibly a units indicator to a
{@link String}.The type of monetary value argument can be any one of any of the
following classes: {@link Coin}, {@link Integer}, {@link Long},
{@link BigInteger}, {@link BigDecimal}.  Numeric types that can represent only
an integer are interpreted as that number of satoshis.  The value of a
{@link BigDecimal} is interpreted as that number of bitcoins, rounded to the
nearest satoshi as necessary.

@param minDecimals The minimum number of decimal places in the fractional part of the formatted number
@param fractionGroups The sizes of optional additional fractional decimal-place groups
@throws IllegalArgumentException if the number of fraction places is negative.