The add operator of the set class returns a boolean which is true if the element (which is to be added) wasn't already there, and false otherwise. Is writingif (set.add(entry)) {    //do some more stuff}considered good style in terms of writing clean code?I am wondering since you do two things at once. 1) adding the element and 2) checking whether the element existed.
Boolean return of set.add() in if conditional?
java;coding style;clean code