boolean (RegExpSimpleClass simpleClass) { return switch (simpleClass.getKind()) { case UNICODE_LINEBREAK, HORIZONTAL_SPACE, NON_HORIZONTAL_SPACE, NON_VERTICAL_SPACE -> hasAtLeastJdkVersion(simpleClass, JavaSdkVersion.JDK_1_8); case VERTICAL_SPACE -> // is vertical tab before jdk 1.8 true; case UNICODE_GRAPHEME -> hasAtLeastJdkVersion(simpleClass, JavaSdkVersion.JDK_1_9); case XML_NAME_START, NON_XML_NAME_START, XML_NAME_PART, NON_XML_NAME_PART -> false; default -> true; }; }