From e9153d5b68f2dcfca495512e07e1d268579ca9fe Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Wed, 30 Oct 2019 10:41:05 +0700 Subject: [PATCH] StringHash: note about implementation added GitOrigin-RevId: 918b121afbd0d0acf666dce0158f37f805f18fbc --- .../src/com/intellij/openapi/util/text/StringHash.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/platform/util-rt/src/com/intellij/openapi/util/text/StringHash.java b/platform/util-rt/src/com/intellij/openapi/util/text/StringHash.java index e20c15f08a92..26d39a7ca622 100644 --- a/platform/util-rt/src/com/intellij/openapi/util/text/StringHash.java +++ b/platform/util-rt/src/com/intellij/openapi/util/text/StringHash.java @@ -128,7 +128,8 @@ public class StringHash { } /** - * Calculates hash value of string + * Calculates hash value of string using buzhash algorithm. + * See http://www.serve.net/buz/hash.adt/java.008.html for details. * * @param arg string to calculate hash value upon * @return calculated hash value @@ -142,6 +143,13 @@ public class StringHash { return h; } + /** + * Calculates hash value of byte array buzhash algorithm. + * See http://www.serve.net/buz/hash.adt/java.008.html for details. + * + * @param arg byte arrayg to calculate hash value upon + * @return calculated hash value + */ public static long calc(byte[] arg) { if (arg == null) return 0; long h = initialHash;