You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/06/16 08:39:34 UTC

[GitHub] [commons-collections] Claudenw opened a new pull request, #314: Move counting long predicate

Claudenw opened a new pull request, #314:
URL: https://github.com/apache/commons-collections/pull/314

   Fix [COLLECTIONS-826](https://issues.apache.org/jira/browse/COLLECTIONS-826)


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


[GitHub] [commons-collections] garydgregory commented on a diff in pull request #314: Move counting long predicate

Posted by GitBox <gi...@apache.org>.
garydgregory commented on code in PR #314:
URL: https://github.com/apache/commons-collections/pull/314#discussion_r905997905


##########
src/main/java/org/apache/commons/collections4/bloomfilter/CountingLongPredicate.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * 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.function.LongPredicate;
+
+/**
+ * A long predicate that applies the test func to each member of the @{code ary} in sequence for each call to @{code test()}.
+ * if the @{code ary} is exhausted, the subsequent calls to to @{code test} are executed with a zero value.
+ * If the calls to @{code test} do not exhaust the @{code ary} the @{code forEachRemaining} method can be called to
+ * execute the @code{text} with a zero value for each remaining @{code idx} value.
+ *
+ */
+class CountingLongPredicate implements LongPredicate {
+    int idx = 0;

Review Comment:
   Why are these not all private?



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


[GitHub] [commons-collections] codecov-commenter commented on pull request #314: Move counting long predicate

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #314:
URL: https://github.com/apache/commons-collections/pull/314#issuecomment-1157395811

   # [Codecov](https://codecov.io/gh/apache/commons-collections/pull/314?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#314](https://codecov.io/gh/apache/commons-collections/pull/314?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1294897) into [master](https://codecov.io/gh/apache/commons-collections/commit/87647d0812f3ec8f10ead3d2059e60801f7538b7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (87647d0) will **increase** coverage by `0.05%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #314      +/-   ##
   ============================================
   + Coverage     86.02%   86.07%   +0.05%     
   - Complexity     4664     4673       +9     
   ============================================
     Files           286      287       +1     
     Lines         13508    13511       +3     
     Branches       1984     1983       -1     
   ============================================
   + Hits          11620    11630      +10     
   + Misses         1325     1321       -4     
   + Partials        563      560       -3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/commons-collections/pull/314?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...mmons/collections4/bloomfilter/BitMapProducer.java](https://codecov.io/gh/apache/commons-collections/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL0JpdE1hcFByb2R1Y2VyLmphdmE=) | `88.88% <ø> (-2.78%)` | :arrow_down: |
   | [...ollections4/bloomfilter/CountingLongPredicate.java](https://codecov.io/gh/apache/commons-collections/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L2Jsb29tZmlsdGVyL0NvdW50aW5nTG9uZ1ByZWRpY2F0ZS5qYXZh) | `100.00% <100.00%> (ø)` | |
   | [...commons/collections4/map/AbstractReferenceMap.java](https://codecov.io/gh/apache/commons-collections/pull/314/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L21hcC9BYnN0cmFjdFJlZmVyZW5jZU1hcC5qYXZh) | `91.48% <0.00%> (+2.59%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/commons-collections/pull/314?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/commons-collections/pull/314?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [87647d0...1294897](https://codecov.io/gh/apache/commons-collections/pull/314?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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


[GitHub] [commons-collections] Claudenw commented on a diff in pull request #314: Move counting long predicate

Posted by GitBox <gi...@apache.org>.
Claudenw commented on code in PR #314:
URL: https://github.com/apache/commons-collections/pull/314#discussion_r906679450


##########
src/main/java/org/apache/commons/collections4/bloomfilter/CountingLongPredicate.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * 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.function.LongPredicate;
+
+/**
+ * A long predicate that applies the test func to each member of the @{code ary} in sequence for each call to @{code test()}.
+ * if the @{code ary} is exhausted, the subsequent calls to to @{code test} are executed with a zero value.
+ * If the calls to @{code test} do not exhaust the @{code ary} the @{code forEachRemaining} method can be called to
+ * execute the @code{text} with a zero value for each remaining @{code idx} value.
+ *
+ */
+class CountingLongPredicate implements LongPredicate {
+    int idx = 0;

Review Comment:
   because I was not paying attention. It should be fixed now.



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


[GitHub] [commons-collections] garydgregory merged pull request #314: Move counting long predicate

Posted by GitBox <gi...@apache.org>.
garydgregory merged PR #314:
URL: https://github.com/apache/commons-collections/pull/314


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