Map's equals() for keys that are arrays
<p>I'm using a TreeMap (SortedMap) whose keys are Object[] with elements of varying types.</p>

<p>TreeMap's equals() doesn't work on Object[] like Arrays's equals() would do -- which means it won't work when using its methods like containsKey() and get() unless I workaround it.</p>

<p>Is there somewhere a solution for this that doesn't involve creating a whole new Class?</p>

<p><strong>EDIT :</strong></p>

<p><strong>Just to make it clear, I made a mistaken assumption. Creating a <code>new Comparator(){}</code> also does affect every method that uses equality, such as <code>equals()</code>, not only the tree sorter.</strong></p>
