code: public void setChoices(double[] limits, String formats[]) {
          if (limits.length != formats.length) {
              throw new IllegalArgumentException(
                  "Array and limit arrays must be of the same length.");
          }
          choiceLimits = limits;
          choiceFormats = formats;
      }
docs: Set the choices to be used in formatting.
  @param limits contains the top value that you want
  parsed with that format,and should be in ascending sorted order. When
  formatting X, the choice will be the i, where
  limit[i] &lt;= X &lt; limit[i+1].
  If the limit array is not in ascending order, the results of formatting
  will be incorrect.
  @param formats are the formats you want to use for each limit.
  They can be either Format objects or Strings.
  When formatting with object Y,
  if the object is a NumberFormat, then ((NumberFormat) Y).format(X)
  is called. Otherwise Y.toString() is called.