Skip to content

Commit 58870e5

Browse files
committed
Minor Javadoc tweaks.
1 parent c1fed43 commit 58870e5

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/main/java/org/apache/commons/codec/digest/MurmurHash3.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
* @since 1.13
5252
*/
5353
public final class MurmurHash3 {
54+
5455
/**
5556
* A random number to use for a hash code.
5657
*
@@ -945,7 +946,7 @@ private static int getLittleEndianInt(final byte[] data, final int index) {
945946
}
946947

947948
/**
948-
* Perform the intermediate mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.
949+
* Performs the intermediate mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.
949950
*
950951
* @param k The data to add to the hash
951952
* @param hash The current hash
@@ -960,7 +961,7 @@ private static int mix32(int k, int hash) {
960961
}
961962

962963
/**
963-
* Perform the final avalanche mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.
964+
* Performs the final avalanche mix step of the 32-bit hash function {@code MurmurHash3_x86_32}.
964965
*
965966
* @param hash The current hash
966967
* @return The final hash
@@ -975,7 +976,7 @@ private static int fmix32(int hash) {
975976
}
976977

977978
/**
978-
* Perform the final avalanche mix step of the 64-bit hash function {@code MurmurHash3_x64_128}.
979+
* Performs the final avalanche mix step of the 64-bit hash function {@code MurmurHash3_x64_128}.
979980
*
980981
* @param hash The current hash
981982
* @return The final hash
@@ -999,23 +1000,27 @@ private static long fmix64(long hash) {
9991000
* @since 1.14
10001001
*/
10011002
public static class IncrementalHash32x86 {
1003+
10021004
/** The size of byte blocks that are processed together. */
10031005
private static final int BLOCK_SIZE = 4;
10041006

10051007
/** Up to 3 unprocessed bytes from input data. */
10061008
private final byte[] unprocessed = new byte[3];
1009+
10071010
/** The number of unprocessed bytes in the tail data. */
10081011
private int unprocessedLength;
1012+
10091013
/** The total number of input bytes added since the start. */
10101014
private int totalLen;
1015+
10111016
/**
10121017
* The current running hash.
10131018
* This must be finalised to generate the 32-bit hash value.
10141019
*/
10151020
private int hash;
10161021

10171022
/**
1018-
* Start a new incremental hash.
1023+
* Starts a new incremental hash.
10191024
*
10201025
* @param seed The initial seed value
10211026
*/
@@ -1114,7 +1119,7 @@ public final int end() {
11141119
}
11151120

11161121
/**
1117-
* Finalise the running hash to the output 32-bit hash by processing remaining bytes
1122+
* Finalize the running hash to the output 32-bit hash by processing remaining bytes
11181123
* and performing final mixing.
11191124
*
11201125
* @param hash The running hash
@@ -1147,7 +1152,7 @@ int finalise(final int hash, final int unprocessedLength, final byte[] unprocess
11471152
}
11481153

11491154
/**
1150-
* Combine the bytes using an Or operation ({@code | } in a little-endian representation
1155+
* Combines the bytes using an Or operation ({@code | } in a little-endian representation
11511156
* of a 32-bit integer; byte 1 will be the least significant byte, byte 4 the most
11521157
* significant.
11531158
*
@@ -1177,6 +1182,7 @@ private static int orBytes(final byte b1, final byte b2, final byte b3, final by
11771182
*/
11781183
@Deprecated
11791184
public static class IncrementalHash32 extends IncrementalHash32x86 {
1185+
11801186
/**
11811187
* {@inheritDoc}
11821188
*

0 commit comments

Comments
 (0)