platform: add notice that sort is not stable

This commit is contained in:
anstarovoyt
2019-03-21 19:50:47 +03:00
parent 2b92b9c630
commit 6d6656b9ce
@@ -1855,6 +1855,9 @@ public class ContainerUtil extends ContainerUtilRt {
return sorted(list, Comparator.naturalOrder());
}
/**
* @apiNote this sort implementation is NOT stable for element.length < INSERTION_SORT_THRESHOLD
*/
public static <T> void sort(@NotNull T[] a, @NotNull Comparator<? super T> comparator) {
int size = a.length;