File tree Expand file tree Collapse file tree 9 files changed +5
-10
lines changed
src/main/java/net/openhft/hashing Expand file tree Collapse file tree 9 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 1919import static java .lang .Long .reverseBytes ;
2020import static java .lang .Long .rotateRight ;
2121import static java .nio .ByteOrder .LITTLE_ENDIAN ;
22- import static net .openhft .hashing .Util .NATIVE_LITTLE_ENDIAN ;
22+ import static net .openhft .hashing .Primitives .NATIVE_LITTLE_ENDIAN ;
2323
2424/**
2525 * Adapted from the C++ CityHash implementation from Google at
Original file line number Diff line number Diff line change 11package net .openhft .hashing ;
22
33import static java .nio .ByteOrder .LITTLE_ENDIAN ;
4- import static net .openhft .hashing .Util .NATIVE_LITTLE_ENDIAN ;
54
65class MetroHash {
76 //primes
Original file line number Diff line number Diff line change 2020import org .jetbrains .annotations .Nullable ;
2121import javax .annotation .ParametersAreNonnullByDefault ;
2222
23- import static java .lang .Long .reverseBytes ;
2423import static java .nio .ByteOrder .LITTLE_ENDIAN ;
25- import static net .openhft .hashing .Util .NATIVE_LITTLE_ENDIAN ;
2624import static net .openhft .hashing .Primitives .unsignedInt ;
2725import static net .openhft .hashing .Primitives .unsignedShort ;
2826
Original file line number Diff line number Diff line change 1616
1717package net .openhft .hashing ;
1818
19- import static net .openhft .hashing .Util .NATIVE_LITTLE_ENDIAN ;
19+ import static java .nio .ByteOrder .LITTLE_ENDIAN ;
20+ import static java .nio .ByteOrder .nativeOrder ;
2021
2122final class Primitives {
2223
2324 private Primitives () {}
2425
26+ static final boolean NATIVE_LITTLE_ENDIAN = nativeOrder () == LITTLE_ENDIAN ;
27+
2528 static long unsignedInt (int i ) {
2629 return i & 0xFFFFFFFFL ;
2730 }
Original file line number Diff line number Diff line change 2121import sun .misc .Unsafe ;
2222
2323import static net .openhft .hashing .Primitives .*;
24- import static net .openhft .hashing .Util .NATIVE_LITTLE_ENDIAN ;
2524
2625public class UnsafeAccess extends Access <Object > {
2726 static final UnsafeAccess INSTANCE ;
Original file line number Diff line number Diff line change 88import static java .nio .ByteOrder .*;
99
1010final class Util {
11- static final boolean NATIVE_LITTLE_ENDIAN = nativeOrder () == LITTLE_ENDIAN ;
1211
1312 /* Known java.vm.name list:
1413 *
Original file line number Diff line number Diff line change 11package net .openhft .hashing ;
22
33import static java .nio .ByteOrder .LITTLE_ENDIAN ;
4- import static net .openhft .hashing .Util .NATIVE_LITTLE_ENDIAN ;
54
65/**
76 * Adapted version of WyHash implementation from https://github.com/wangyi-fudan/wyhash
Original file line number Diff line number Diff line change 2121import static java .nio .ByteOrder .LITTLE_ENDIAN ;
2222import static net .openhft .hashing .Maths .unsignedLongMulXorFold ;
2323import static net .openhft .hashing .UnsafeAccess .*;
24- import static net .openhft .hashing .Util .NATIVE_LITTLE_ENDIAN ;
2524
2625/**
2726 * Adapted version of XXH3 implementation from https://github.com/Cyan4973/xxHash.
Original file line number Diff line number Diff line change 1717package net .openhft .hashing ;
1818
1919import static java .nio .ByteOrder .LITTLE_ENDIAN ;
20- import static net .openhft .hashing .Util .NATIVE_LITTLE_ENDIAN ;
2120
2221/**
2322 * Adapted version of xxHash implementation from https://github.com/Cyan4973/xxHash.
You can’t perform that action at this time.
0 commit comments