Claudenw commented on a change in pull request #258:
URL: 
https://github.com/apache/commons-collections/pull/258#discussion_r798276417



##########
File path: 
src/main/java/org/apache/commons/collections4/bloomfilter/IndexProducer.java
##########
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.collections4.bloomfilter;
+
+import java.util.Objects;
+import java.util.function.IntPredicate;
+import java.util.function.LongPredicate;
+
+/**
+ * An object that produces indices of a Bloom filter.
+ *
+ * @since 4.5
+ */
+public interface IndexProducer {
+
+    /**
+     * Each index is passed to the predicate.  The predicate is applied to each
+     * index value, if the predicate returns {@code false} the execution is 
stopped, {@code false}
+     * is returned, and no further indices are processed.
+     *
+     * <p>Any exceptions thrown by the action are relayed to the caller.</p>
+     *
+     * <p>Indices ordering is not guaranteed</p>
+     *
+     * @param predicate the action to be performed for each non-zero bit index.
+     * @return {@code true} if all indexes return true from consumer, {@code 
false} otherwise.
+     * @throws NullPointerException if the specified action is null
+     */
+    boolean forEachIndex(IntPredicate predicate);
+
+    /**
+     * Creates an IndexProducer from an array of integers
+     * @param values the index values
+     * @return an IndexProducer that uses the values.
+     */
+    static IndexProducer fromIntArray( final int[] values ) {

Review comment:
       fixed.  I will continue to close comments that are fixed but without 
comment if the changes were implemented without change.  If additional changes 
were performed due to the noted issue I will comment.




-- 
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