garydgregory commented on code in PR #492:
URL: 
https://github.com/apache/commons-collections/pull/492#discussion_r1605042758


##########
src/main/java/org/apache/commons/collections4/bloomfilter/BitMapExtractor.java:
##########
@@ -61,33 +61,33 @@ public boolean forEachBitMap(final LongPredicate predicate) 
{
             }
 
             @Override
-            public boolean forEachBitMapPair(final BitMapProducer other, final 
LongBiPredicate func) {
+            public boolean processBitMapPairs(final BitMapExtractor other, 
final LongBiPredicate func) {
                 final CountingLongPredicate p = new 
CountingLongPredicate(bitMaps, func);
-                return other.forEachBitMap(p) && p.forEachRemaining();
+                return other.processBitMaps(p) && p.processRemaining();
             }
         };
     }
 
     /**
-     * Creates a BitMapProducer from an IndexProducer.
-     * @param producer the IndexProducer that specifies the indexes of the 
bits to enable.
+     * Creates a BitMapExtractor from an IndexExtractor.
+     * @param extractor the IndexExtractor that specifies the indexes of the 
bits to enable.
      * @param numberOfBits the number of bits in the Bloom filter.
-     * @return A BitMapProducer that produces the bit maps equivalent of the 
Indices from the producer.
+     * @return A BitMapExtractor that produces the bit maps equivalent of the 
Indices from the extractor.
      */
-    static BitMapProducer fromIndexProducer(final IndexProducer producer, 
final int numberOfBits) {
-        Objects.requireNonNull(producer, "producer");
+    static BitMapExtractor fromIndexExtractor(final IndexExtractor extractor, 
final int numberOfBits) {
+        Objects.requireNonNull(extractor, "extractor");
         Objects.requireNonNull(numberOfBits, "numberOfBits");
 
-        final long[] result = new long[BitMap.numberOfBitMaps(numberOfBits)];
-        producer.forEachIndex(i -> {
-            BitMap.set(result, i);
+        final long[] result = new long[BitMaps.numberOfBitMaps(numberOfBits)];
+        extractor.processIndices(i -> {
+            BitMaps.set(result, i);

Review Comment:
   Also (unrelated), would it ever make sense for `BitMaps.set()` to return a 
boolean for the result of its `OR` operation? I'm not sure anyone would use 
that.



-- 
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-unsubscr...@commons.apache.org

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

Reply via email to