SparseArray really ought to have a Bidirectional iterator or better still a random access iterator when the index set has a total order. Make the structure of all equals methods: public boolean equals ( final Object o ) { if ( this == o ) { return true ; } if ( ( o == null ) || ! ( o instanceof TYPE ) ) { return false ; } // test for value equality } Make count sort deal with negative indexes. Do this as an exercise? Implement a Red-Black Tree. Ensure all the Mapping correctly sort out uniqueness of the items in the domain. Currently they are just implementing relations.