|
13 | 13 | class PgmIndexUtil {
|
14 | 14 |
|
15 | 15 | /** Adds the first key of the current segment to the segment data bytes. */
|
16 |
| - static <KType> void addKey(KType key, IntGrowableArray segmentData) { |
| 16 | + static <KType> void addKey(KType key, IntArrayList segmentData) { |
17 | 17 | throw new UnsupportedOperationException("Invalid for generic type: " + key);
|
18 | 18 | }
|
19 | 19 |
|
20 | 20 | /** Adds the first key of the current segment to the segment data bytes. */
|
21 |
| - static void addKey(int key, IntGrowableArray segmentData) { |
| 21 | + static void addKey(int key, IntArrayList segmentData) { |
22 | 22 | segmentData.add(key);
|
23 | 23 | }
|
24 | 24 |
|
25 | 25 | /** Adds the first key of the current segment to the segment data bytes. */
|
26 |
| - static void addKey(float key, IntGrowableArray segmentData) { |
| 26 | + static void addKey(float key, IntArrayList segmentData) { |
27 | 27 | addKey(Float.floatToIntBits(key), segmentData);
|
28 | 28 | }
|
29 | 29 |
|
30 | 30 | /** Adds the first key of the current segment to the segment data bytes. */
|
31 |
| - static void addKey(long key, IntGrowableArray segmentData) { |
| 31 | + static void addKey(long key, IntArrayList segmentData) { |
32 | 32 | segmentData.add((int) key);
|
33 | 33 | segmentData.add((int) (key >> 32));
|
34 | 34 | }
|
35 | 35 |
|
36 | 36 | /** Adds the first key of the current segment to the segment data bytes. */
|
37 |
| - static void addKey(double key, IntGrowableArray segmentData) { |
| 37 | + static void addKey(double key, IntArrayList segmentData) { |
38 | 38 | addKey(Double.doubleToRawLongBits(key), segmentData);
|
39 | 39 | }
|
40 | 40 |
|
@@ -70,7 +70,7 @@ static double getKey(int segmentDataIndex, int[] segmentData, double keyType) {
|
70 | 70 | *
|
71 | 71 | * @param keySize The size of the key, measure in {@link Integer#BYTES}.
|
72 | 72 | */
|
73 |
| - static void addIntercept(long intercept, IntGrowableArray segmentData, int keySize) { |
| 73 | + static void addIntercept(long intercept, IntArrayList segmentData, int keySize) { |
74 | 74 | assert keySize >= 1 && keySize <= 2;
|
75 | 75 | if (keySize == 1) {
|
76 | 76 | addKey((int) intercept, segmentData);
|
@@ -98,7 +98,7 @@ static long getIntercept(int segmentDataIndex, int[] segmentData, int keySize) {
|
98 | 98 | *
|
99 | 99 | * @param keySize The size of the key, measure in {@link Integer#BYTES}.
|
100 | 100 | */
|
101 |
| - static void addSlope(double slope, IntGrowableArray segmentData, int keySize) { |
| 101 | + static void addSlope(double slope, IntArrayList segmentData, int keySize) { |
102 | 102 | assert keySize >= 1 && keySize <= 2;
|
103 | 103 | if (keySize == 1) {
|
104 | 104 | addKey((float) slope, segmentData);
|
|
0 commit comments