private static String flagString(int flags) {
    final StringBuilder result = new StringBuilder(8);
    if ((flags & LEFT_JUSTIFY) != 0) {
      result.append('-');
    }
    if ((flags & ALTERNATE) != 0) {
      result.append('#');
    }
    if ((flags & PLUS) != 0) {
      result.append('+');
    }
    if ((flags & LEADING_SPACE) != 0) {
      result.append(' ');
    }
    if ((flags & ZERO_PAD) != 0) {
      result.append('0');
    }
    if ((flags & GROUP) != 0) {
      result.append(',');
    }
    if ((flags & PARENTHESES) != 0) {
      result.append('(');
    }
    if ((flags & PREVIOUS) != 0) {
      result.append('<');
    }
    return result.toString();
  }
private static String flagString(int flags)