No idea why you’d make your classes implement DoubleSupplier. The normal way to do this would be to make the classes implement Comparable (if you’re writing them all? ). If you change your generic definition to then be <T extends Comparable> you can access the interface method. Of course, you don’t really need to because sort is already available for arrays and collections of items using Comparable.
https://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html