code: @Override
      public AttributedCharacterIterator formatToCharacterIterator(Object obj) { synchronized(numberFormat) {
          DecimalFormatSymbols anteSigns = numberFormat.getDecimalFormatSymbols();
          BigDecimal units = denominateAndRound(inSatoshis(obj), minimumFractionDigits, decimalGroups);
          List<Integer> anteDigits = setFormatterDigits(numberFormat, units.scale(), units.scale());
          AttributedCharacterIterator i = numberFormat.formatToCharacterIterator(units);
          numberFormat.setDecimalFormatSymbols(anteSigns);
          setFormatterDigits(numberFormat, anteDigits.get(0), anteDigits.get(1));
          return i;
      }}
docs: Formats a bitcoin monetary value and returns an {@link AttributedCharacterIterator}.
  By iterating, you can examine what fields apply to each character.  This can be useful
  since a character may be part of more than one field, for example a grouping separator
  that is also part of the integer field.
  
  @see AttributedCharacterIterator