Skip to content

Commit

Permalink
performance note for O(1) remapping
Browse files Browse the repository at this point in the history
  • Loading branch information
fluentfuture committed Jun 7, 2024
1 parent 38e3605 commit ca61714
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,11 @@ V getValue() {
* .toMap();
* }</pre>
*
* <p>Performance note: when a range is repetitively detected to overlap with another range,
* and the mapped values are re-mapped to each split sub-range, the re-mapping takes O(1) time
* even when there have been N mapped values. The final mapped values for each disjoint range
* will be eventually collected using the {@code valueCollector}, once per disjoint range.
*
* @since 8.1
*/
public static <K extends Comparable<K>, V, R> BiCollector<Range<K>, V, BiStream<Range<K>, R>>
Expand Down

0 comments on commit ca61714

Please sign in to comment.