void (@Nullable SearchQueryParser.Installed parser) { if (parser == null) { myState = false; return; } myState = switch (myOption) { case Enabled -> parser.enabled; case Disabled -> parser.disabled; case Downloaded -> parser.downloaded; case Bundled -> parser.bundled; case Invalid -> parser.invalid; case NeedUpdate -> parser.needUpdate; }; }