I'm searching for a method that can compare two non-primitive Long
objects in Java. Something like this : Longs.compare(Long x, Long y)
. As I didn't find anything on the web yet, I am wondering if a such library implement that.
So far, I compared them with Long.compare(x, y)
but now I've realized that x
and y
can be null, so sometimes I can get a NullPointerException
.
Do you know any library that can do that?
PS : My need is not the same as this post. I want to know if x > y
not if x == y
.