private static int flag(char c) {
    return switch (c) {
      case '-' -> LEFT_JUSTIFY;
      case '#' -> ALTERNATE;
      case '+' -> PLUS;
      case ' ' -> LEADING_SPACE;
      case '0' -> ZERO_PAD;
      case ',' -> GROUP;
      case '(' -> PARENTHESES;
      case '<' -> PREVIOUS;
      default -> -1;
    };
  }
private static int flag(char c)