Override ArrayList indexOf
Ok, so I have a TreeNode class that wraps a Character inside a node of a tree. In order to make things easier, I overrode the equals and compareTo methods so it accepted not only TreeNodes, but also Characters, as the TreeNode is just a wrapper to a Character.
I'm working with an ArrayList<TreeNode>, and I would like to have the indexOf method when receiving a Character to return me the index of the TreeNode that wraps that Character, if it exists.
Reading the indexOf definition, it uses the equals method to make the comparison, so i figured that, as my TreeNode.equals(Object o) method is already able to receive Characters, the indexOf method would work for MyArrayList.indexOf(someCharacter), but it doesn't.
I put a breakpoint in the TreeNode.equals(Object o) method to find out if it was called after a call to MyArrayList.indexOf(someCharacter), but it never gets called.
Is there a way to implement this behaviour, or should I extend the ArrayList class to implement the behaviour I want?

