Is there any automatic tool to convert a chain of "condition ? expr1 : expr2" to a more readable chain of "if"s? I'm using Java in Netbeans.
For example:
super(dao == null || (dao.isX.get() != null && dao.isX.getBoolean()) ? (isY ? "String1" : (isZ ? "String2" : (isA ? String3 : "String4"))) : "String5", BoxLayout.y());
Note: I can do that by hand, but I'm asking for an automatic tool to avoid errors when I find complex chains of "condition ? expr1 : expr2".
Aucun commentaire:
Enregistrer un commentaire