Quicksort implementation equivalent to Collections.sort()
As far as your understanding of generics, I think you've pretty much got it.

On other matters:


(x, y) -&gt; x.compareTo(y) - that can be reduced to a function reference Comparable::compareTo.  In this specific case, it's also available to you as Comparator.naturalOrder()
You should double check your random number generator for getting your pivot.  It looks to me like you're taking a pivot element from anywhere in the list, not in the sublist that you're sorting.