title: How to compare two non-primitive Long in Java?
body: <p>I'm searching for a method that can compare two non-primitive <code>Long</code> objects in Java. Something like this : <code>Longs.compare(Long x, Long y)</code>. As I didn't find anything on the web yet, I am wondering if a such library implement that.</p>
  
  <p>So far, I compared them with <code>Long.compare(x, y)</code> but now I've realized that <code>x</code> and <code>y</code> can be null, so sometimes I can get a <code>NullPointerException</code>.</p>
  
  <p>Do you know any library that can do that?</p>
  
  <p>PS : My need is not the same as this <a href="https://stackoverflow.com/questions/20541636/compare-non-primitive-long-values-127-and-128">post</a>. I want to know if <code>x &gt; y</code> not if <code>x == y</code>.</p>