public class SortedCharArrays
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BINARY_SEARCH_THRESHOLD |
static java.util.Comparator<char[]> |
CHAR_ARR_COMPARATOR |
static java.util.Comparator<char[][]> |
CHAR_CHAR_ARR_COMPARATOR |
| Constructor and Description |
|---|
SortedCharArrays() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareCharArray(char[] left,
char[] right)
Compares the two char arrays.
|
static int |
compareCharCharArray(char[][] left,
char[][] right)
Compares the two char-char arrays.
|
static <T> T[] |
insertIntoArray(T[] src,
T[] target,
T entry,
int idx,
int currentCount) |
public static final int BINARY_SEARCH_THRESHOLD
public static final java.util.Comparator<char[]> CHAR_ARR_COMPARATOR
public static final java.util.Comparator<char[][]> CHAR_CHAR_ARR_COMPARATOR
public static <T> T[] insertIntoArray(T[] src,
T[] target,
T entry,
int idx,
int currentCount)
target - same as source array or new array with higher capacityidx - position for new elementcurrentCount - the current number of elements in the source arraypublic static int compareCharArray(char[] left,
char[] right)
Character.compare(char, char)public static int compareCharCharArray(char[][] left,
char[][] right)
compareCharArray(char[], char[]).