Implementing compareTo on Array of Objects