code: public Format[] getFormats() {
          ArrayList<Format> list = new ArrayList<Format>();
          for (int partIndex = 0; (partIndex = nextTopLevelArgStart(partIndex)) >= 0;) {
              list.add(cachedFormatters == null ? null : cachedFormatters.get(partIndex));
          }
          return list.toArray(new Format[list.size()]);
      }
docs: Returns the Format objects used for the format elements in the
  previously set pattern string.
  The order of formats in the returned array corresponds to
  the order of format elements in the pattern string.
  <p>
  Since the order of format elements in a pattern string often
  changes during localization, it's generally better to use the
  {@link #getFormatsByArgumentIndex()}
  method, which assumes an order of formats corresponding to the
  order of elements in the <code>arguments</code> array passed to
  the <code>format</code> methods or the result array returned by
  the <code>parse</code> methods.
  
  This method is only supported when exclusively numbers are used for
  argument names. Otherwise an IllegalArgumentException is thrown.
  
  @return the formats used for the format elements in the pattern
  @throws IllegalArgumentException if this format uses named arguments