code: @Override
    public String format(int index)
    {
      StringBuilder sb = new StringBuilder();
      final RomanNumeral[] values = RomanNumeral.values();
      for(int i = values.length - 1; i >= 0; i--) {
        while(index >= values[i].weight) {
          sb.append(values[i]);
          index -= values[i].weight;
        }
      }
      return sb.toString();
    }
docs: Format index as upper case Roman numeral.
  
  @param index index value.
  @return formatted index.