Your shuffle
and swap
methods aren't using compareTo
, so there is no reason to make the type Comparable
.
In this case, an Object[]
seems to be the best option, as a replacement for Comparable[]
. Any objects can be shuffled. That's as general as it gets.