Skip to content

Commit 0e164c5

Browse files
committed
Added Javadoc to LongHashFunction.java
1 parent 8934ed9 commit 0e164c5

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/main/java/net/openhft/hashing/LongHashFunction.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
*
4949
* <p>Hash function implementation could either produce equal results for equal input on platforms
5050
* with different {@link ByteOrder}, favoring one byte order in terms of performance, or different
51-
* results, but performing equally good. This choice should be explicitly documented for all
51+
* results, but performing equally well. This choice should be explicitly documented for all
5252
* {@code LongHashFunction} implementations.
5353
*
5454
* <h2>Subclassing</h2>
5555
* To implement a specific hash function algorithm, this class should be subclassed. Only methods
56-
* that accept single primitives, {@link #hashVoid()} and {@link #hash(Object, Access, long, long)}
57-
* should be implemented; other have default implementations which in the end delegate to
56+
* that accept single primitives, {@link #hashVoid()}, and {@link #hash(Object, Access, long, long)}
57+
* should be implemented; others have default implementations which ultimately delegate to the
5858
* {@link #hash(Object, Access, long, long)} abstract method.
5959
*
6060
* <p>Notes about how exactly methods with default implementations are implemented in doc comments
@@ -64,7 +64,8 @@
6464
* to which the referenced method delegates.
6565
*
6666
*<p>{@code LongHashFunction} implementations shouldn't assume that {@code Access} strategies
67-
* do defensive checks, and access only bytes within the requested range.
67+
* do defensive checks and access only bytes within the requested range.
68+
*
6869
*/
6970
public abstract class LongHashFunction implements Serializable {
7071
private static final long serialVersionUID = 0L;
@@ -76,6 +77,7 @@ public abstract class LongHashFunction implements Serializable {
7677
* equal results for equal input on platforms with different {@link ByteOrder}, but is slower
7778
* on big-endian platforms than on little-endian.
7879
*
80+
* @return A hash function implementing the CityHash64 algorithm, version 1.1, without seed values.
7981
* @see #city_1_1(long)
8082
* @see #city_1_1(long, long)
8183
*/
@@ -90,6 +92,9 @@ public static LongHashFunction city_1_1() {
9092
* equal results for equal input on platforms with different {@link ByteOrder}, but is slower
9193
* on big-endian platforms than on little-endian.
9294
*
95+
* @param seed The seed value to use for hashing.
96+
* @return A hash function implementing the CityHash64 algorithm, version 1.1, using the given seed value.
97+
*
9398
* @see #city_1_1()
9499
* @see #city_1_1(long, long)
95100
*/
@@ -104,6 +109,10 @@ public static LongHashFunction city_1_1(long seed) {
104109
* produce equal results for equal input on platforms with different {@link ByteOrder}, but
105110
* is slower on big-endian platforms than on little-endian.
106111
*
112+
* @param seed0 The first seed value to use for hashing.
113+
* @param seed1 The second seed value to use for hashing.
114+
* @return A hash function implementing the CityHash64 algorithm, version 1.1, using the two given seed values.
115+
*
107116
* @see #city_1_1()
108117
* @see #city_1_1(long)
109118
*/

0 commit comments

Comments
 (0)