Hi, I would like to check if it is possible to refactor the comparison logic inside a comparator to the individual classes that are being compared. Instead of accessing the variables and doing a comparison, I would like to shift the logic into a compareTo method inside the compared class itself. The logic itself will not be changed. Thank you!
Hi, I would like to check if it is possible to refactor the comparison logic inside a comparator to the individual classes that are being compared. Instead of accessing the variables and doing a comparison, I would like to shift the logic into a compareTo method inside the compared class itself. The logic itself will not be changed. Thank you!