Class SortedCharArrays
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.util.SortedCharArrays
- Since:
- 3.18
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
static Comparator<char[]>
static Comparator<char[][]>
-
Constructor Summary
Constructors -
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:
- Constant Field Values
-
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:
Character.compare(char, char)
-
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[])
.
-