Package org.greenrobot.essentials.hash
Class Murmur3A
- java.lang.Object
-
- org.greenrobot.essentials.hash.Murmur3A
-
- All Implemented Interfaces:
java.util.zip.Checksum
public class Murmur3A extends java.lang.Object implements java.util.zip.Checksum
Murmur3A (murmurhash3_x86_32)
-
-
Field Summary
Fields Modifier and Type Field Description private static int
C1
private static int
C2
private int
h1
private int
length
private int
partialK1
private int
partialK1Pos
private static PrimitiveArrayUtils
primitiveArrayUtils
private int
seed
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
applyK1(int k1)
long
getValue()
void
reset()
void
update(byte[] b)
void
update(byte[] b, int off, int len)
void
update(int b)
void
updateBoolean(boolean value)
updates a byte with 0 for false and 1 for truevoid
updateDouble(double number)
void
updateFloat(float number)
void
updateInt(int value)
void
updateInt(int... values)
void
updateLong(long value)
void
updateLong(long... values)
void
updateShort(short value)
void
updateShort(short... values)
-
-
-
Field Detail
-
primitiveArrayUtils
private static PrimitiveArrayUtils primitiveArrayUtils
-
C1
private static final int C1
- See Also:
- Constant Field Values
-
C2
private static final int C2
- See Also:
- Constant Field Values
-
seed
private final int seed
-
h1
private int h1
-
length
private int length
-
partialK1
private int partialK1
-
partialK1Pos
private int partialK1Pos
-
-
Method Detail
-
update
public void update(int b)
- Specified by:
update
in interfacejava.util.zip.Checksum
-
update
public void update(byte[] b, int off, int len)
- Specified by:
update
in interfacejava.util.zip.Checksum
-
update
public void update(byte[] b)
- Specified by:
update
in interfacejava.util.zip.Checksum
-
updateShort
public void updateShort(short value)
-
updateShort
public void updateShort(short... values)
-
updateInt
public void updateInt(int value)
-
updateInt
public void updateInt(int... values)
-
updateLong
public void updateLong(long value)
-
updateLong
public void updateLong(long... values)
-
updateFloat
public void updateFloat(float number)
-
updateDouble
public void updateDouble(double number)
-
updateBoolean
public void updateBoolean(boolean value)
updates a byte with 0 for false and 1 for true
-
applyK1
private void applyK1(int k1)
-
getValue
public long getValue()
- Specified by:
getValue
in interfacejava.util.zip.Checksum
-
reset
public void reset()
- Specified by:
reset
in interfacejava.util.zip.Checksum
-
-