You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Claudenw (via GitHub)" <gi...@apache.org> on 2023/07/05 18:58:00 UTC

[GitHub] [commons-collections] Claudenw commented on a diff in pull request #402: COLLECTIONS-843: Implement Layered Bloom filter

Claudenw commented on code in PR #402:
URL: https://github.com/apache/commons-collections/pull/402#discussion_r1253508055


##########
src/test/java/org/apache/commons/collections4/bloomfilter/TestingHashers.java:
##########
@@ -88,4 +90,18 @@ public static <T extends BloomFilter> T populateRange(T filter, int start, int e
         });
         return filter;
     }
+
+    private static Random random;
+
+    static {
+        random = new Random();
+        random.setSeed( System.currentTimeMillis());
+    }
+
+    /**
+     * Creates an EnhancedDoubleHasher hasher from 2 random longs.
+     */
+    public static Hasher randomHasher() {

Review Comment:
   True,  but when developing new Bloom filter implementations (not necessarily in this package) having the randomHasher implementation handy is a great help.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org