Class SortedCharArrays
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.util.SortedCharArrays
- Since:
- 3.18
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final Comparator
<char[]> static final Comparator
<char[][]> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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)
-
Field Details
-
BINARY_SEARCH_THRESHOLD
public static final int BINARY_SEARCH_THRESHOLD- See Also:
-
CHAR_ARR_COMPARATOR
-
CHAR_CHAR_ARR_COMPARATOR
-
-
Constructor Details
-
SortedCharArrays
public SortedCharArrays()
-
-
Method Details
-
insertIntoArray
public static <T> T[] insertIntoArray(T[] src, T[] target, T entry, int idx, int currentCount) - Parameters:
target
- same as source array or new array with higher capacityidx
- position for new elementcurrentCount
- the current number of elements in the source array- Returns:
- given target array
-
compareCharArray
public static int compareCharArray(char[] left, char[] right) Compares the two char arrays. Longer arrays are considered to be smaller than shorter arrays. Arrays with the same length are compared char by char lexicographically.- See Also:
-
compareCharCharArray
public static int compareCharCharArray(char[][] left, char[][] right) Compares the two char-char arrays. Longer arrays are considered to be smaller than shorter arrays. Arrays with the same length are compared according to the logic incompareCharArray(char[], char[])
.
-