String (String mapMethod) { return switch (mapMethod) { case "map" -> "flatMap"; case "mapToInt" -> "flatMapToInt"; case "mapToLong" -> "flatMapToLong"; case "mapToDouble" -> "flatMapToDouble"; default -> // Something unsupported passed: ignore null; }; }