Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize CollectionUtils.intersection() #83

Closed
javeme opened this issue Oct 9, 2018 · 0 comments
Closed

optimize CollectionUtils.intersection() #83

javeme opened this issue Oct 9, 2018 · 0 comments
Assignees
Labels
improvement General improvement
Milestone

Comments

@javeme
Copy link
Contributor

javeme commented Oct 9, 2018

Expected behavior 期望表现

Since the apache CollectionUtils.intersection() is based on copy and element count statistics,
most of the time, we can change the original set without having to reconstruct the set and copy.
So we provide an optimized method based on retainAll().
Also add hasIntersection(set1, set2) for CollectionUtils.intersection(set1, set2).isEmpty()

@javeme javeme added the improvement General improvement label Oct 9, 2018
Linary added a commit that referenced this issue Oct 9, 2018
Improve #83

Change-Id: I31ef1506d0b413ab73ccb4d735c9c7cfafe8acbb
Linary added a commit that referenced this issue Oct 10, 2018
Improve #83

Change-Id: I31ef1506d0b413ab73ccb4d735c9c7cfafe8acbb
Linary added a commit that referenced this issue Oct 12, 2018
Improve #83

Change-Id: I31ef1506d0b413ab73ccb4d735c9c7cfafe8acbb
zhoney pushed a commit that referenced this issue Oct 15, 2018
Improve #83

Change-Id: I31ef1506d0b413ab73ccb4d735c9c7cfafe8acbb
@zhoney zhoney closed this as completed Nov 27, 2018
@javeme javeme added this to the 0.8 milestone Apr 13, 2019
VGalaxies pushed a commit that referenced this issue Aug 3, 2024
* chore: support java 17

* fix: unitest

* fix: server JAX-B API not found warning

* chore: improve code

* fix: hugeconfig test

* chore: resolve conflict

* fix: version unit test

* chore: improve code

* chore: improve impl version

* chore: improve code

* refactor: hugeconfig get

* chore: improve code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement General improvement
Projects
None yet
Development

No branches or pull requests

3 participants