Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That is not a problem, just pick the same equality that your .compareTo method uses.

You could pick -0 < 0, and -0 ≠ 0, or -0 = 0. You should never pick -0 < 0 (via compareTo), but -0 = 0 (via equals).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: