code: public static String format(String format, int value) {
          prec = 0;
          point = false;
          df = null;
  
          analyse_format(format);
  
          StringBuilder out = new StringBuilder();
  
          if (df != null)
              out.append(df.format(value));
          else
              out.append(value);
          if (pos) {
              if (value > 0)
                  out.insert(0, "+");
              pos = false;
          }
          return out.toString();
      }
docs: Format the attribute value (value is an int).
  <p/>
  This method returns the input value as a string formatted according to the
  format parameter. The syntax of this format string is the syntax defined
  for the attribute format property.
  
  @param format The format string (as defined in the attribute property format)
  @param value  The attribute value
  @return The input value as a string