mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-28 10:02:28 -06:00
44 lines
1.3 KiB
Java
44 lines
1.3 KiB
Java
|
package com.google.common.collect;
|
||
|
|
||
|
import javax.annotation.CheckForNull;
|
||
|
|
||
|
@ElementTypesAreNonnullByDefault
|
||
|
/* loaded from: classes3.dex */
|
||
|
final class Hashing {
|
||
|
private static final long C1 = -862048943;
|
||
|
private static final long C2 = 461845907;
|
||
|
private static final int MAX_TABLE_SIZE = 1073741824;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static boolean needsResizing(int i, int i2, double d) {
|
||
|
return ((double) i) > d * ((double) i2) && i2 < 1073741824;
|
||
|
}
|
||
|
|
||
|
private Hashing() {
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static int smear(int i) {
|
||
|
return (int) (Integer.rotateLeft((int) (i * C1), 15) * C2);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static int smearedHash(@CheckForNull Object obj) {
|
||
|
return smear(obj == null ? 0 : obj.hashCode());
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static int closedTableSize(int i, double d) {
|
||
|
int max = Math.max(i, 2);
|
||
|
int highestOneBit = Integer.highestOneBit(max);
|
||
|
if (max <= ((int) (d * highestOneBit))) {
|
||
|
return highestOneBit;
|
||
|
}
|
||
|
int i2 = highestOneBit << 1;
|
||
|
if (i2 > 0) {
|
||
|
return i2;
|
||
|
}
|
||
|
return 1073741824;
|
||
|
}
|
||
|
}
|