Package com.yandex.ydb.table.utils
Class Arrays2
- java.lang.Object
-
- com.yandex.ydb.table.utils.Arrays2
-
public final class Arrays2 extends Object
- Author:
- Sergey Polovko
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends Comparable<T>>
booleanisSorted(T[] a)Check if array is sorted.static <T extends Comparable<T>,U>
voidsortBothByFirst(T[] first, U[] second)In-place sort both arrays using comparability of elements of the first array.
-
-
-
Method Detail
-
isSorted
public static <T extends Comparable<T>> boolean isSorted(T[] a)
Check if array is sorted.- Returns:
trueiff array sorted
-
sortBothByFirst
public static <T extends Comparable<T>,U> void sortBothByFirst(T[] first, U[] second)
In-place sort both arrays using comparability of elements of the first array.
-
-