Claudenw commented on code in PR #492:
URL:
https://github.com/apache/commons-collections/pull/492#discussion_r1605689991
##########
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:
Gary, I am happy to discuss any changes you would like to see in the
codebase.
However this change was simply to effect the change in nomenclature as
discussed on the mailing list. I would like to restrict this to just the
nomenclature changes without any functional changes.
--
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]