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


##########
src/main/java/org/apache/commons/collections4/bloomfilter/HasherCollection.java:
##########
@@ -106,6 +120,23 @@ public boolean forEachIndex(IntPredicate consumer) {
         };
     }
 
+    /**
+     * Creates an IndexProducer of comprising the unique indices across all 
the contained
+     * hashers.
+     *
+     * <p>This is equivalent to an IndexProducer created from a Bloom filter 
that comprises all
+     * the contained hashers.</p>
+     *
+     * @param shape the shape of the desired Bloom filter.
+     * @return the iterator of integers
+     */
+    public IndexProducer absoluteUniqueIndices(final Shape shape) {
+        return consumer -> {
+            Objects.requireNonNull(consumer, "consumer");
+            return uniqueIndices(shape).forEachIndex(IndexFilter.create(shape, 
consumer));

Review Comment:
   implemented later version with a check for hashers.size() == 0



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to