I have an object with 3 attributes, where only one can be not null. I would like to call a methode with the argument that is not null but if possible without a large if else
statement.
I thought of something like this, but it doesn't work.
myMethode(myObj.getAttr1() || myObj.getAttr2() || myObj.getAttr3());
What would be a good solution?