title: Java TreeSet<Long []> comparable based on array's first element
body: <p>For the following codes: </p>
  
  <pre><code>    TreeSet&lt;Long[]&gt; ts = new TreeSet&lt;Long[]&gt;();
      ts.add(new Long[] {22L,22L});
      ts.add(new Long[] {2L,22L});
      ts.add(new Long[] {24L,22L});
      ts.add(new Long[] {11L,22L});
      ts.add(new Long[] {7L,22L});
  </code></pre>
  
  <p>It throws: </p>
  
  <pre><code>Ljava.lang.Long; cannot be cast to java.lang.Comparable
  </code></pre>
  
  <p>Because the <code>Long []</code> doesn't realize <code>comparable</code></p>
  
  <p>Is there a neat way to let the <code>Long []</code> added into the <code>TreeSet</code> sorted based on <code>Long []</code>'s first element?</p>