Skip to content
New issue

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

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

Already on GitHub? # to your account

GH-88: Implement Grouping, Filtering, and Valiation of Increasing/Decreasing/NonIncreasing/NonDecreasing #93

Merged
merged 4 commits into from
Feb 12, 2025

Conversation

tginsberg
Copy link
Owner

  • Group elements to Lists so long as they are increasing, decreasing, non-increasing, or non-decreasing
  • Ensure that streams are increasing, decreasing, non-increasing, or non-decreasing and fail otherwise
  • Both grouping and ensure functions can operate on a stream of Comparable objects or caller can specify a Comparator
  • Addresses Incrementing Subsequences #88

+ Group elements to Lists so long as they are increasing, decreasing, non-increasing, or non-decreasing
+ Ensure that streams are increasing, decreasing, non-increasing, or non-decreasing and fail otherwise
+ Both grouping and ensure functions can operate on a stream of `Comparable` objects or caller can specify a `Comparator`
Copy link

Overall Project 98.94% -0.06% 🍏
Files changed 99.43% 🍏

File Coverage
IncreasingDecreasingComparableGatherer.java 100% 🍏
IncreasingDecreasingComparatorGatherer.java 99.36% -0.64% 🍏
Gatherers4j.java 99.28% 🍏
FlattenSingleOrFail.java 98.15% -1.85% 🍏

Copy link

Overall Project 98.94% -0.06% 🍏
Files changed 99.43% 🍏

File Coverage
IncreasingDecreasingComparableGatherer.java 100% 🍏
IncreasingDecreasingComparatorGatherer.java 99.36% -0.64% 🍏
Gatherers4j.java 99.28% 🍏
FlattenSingleOrFail.java 98.15% -1.85% 🍏

Copy link

Overall Project 98.95% -0.09% 🍏
Files changed 99.36% 🍏

File Coverage
ChangingComparableGatherer.java 100% 🍏
ChangingOperation.java 100% 🍏
FilterChangingComparableGatherer.java 100% 🍏
Gatherers4j.java 99.35% 🍏
ChangingComparatorGatherer.java 98.82% -1.18% 🍏
FilterChangingComparatorGatherer.java 98.57% -1.43% 🍏
FlattenSingleOrFail.java 98.15% -1.85% 🍏

+ We can eliminate a few implementations that only existed to satisfy the type system if we move their constructors to static factory methods
+ Rename to GroupChangingGatherer and combine tests
+ Combine FilterChangingGatherer tests
Copy link

Overall Project 98.94% -0.09% 🍏
Files changed 99.32% 🍏

File Coverage
ChangingOperation.java 100% 🍏
Gatherers4j.java 99.29% 🍏
GroupChangingGatherer.java 98.97% -1.03% 🍏
FilterChangingGatherer.java 98.78% -1.22% 🍏
FlattenSingleOrFail.java 98.15% -1.85% 🍏

@tginsberg tginsberg changed the title GH-88: Implement Increasing/Decreasing/NonIncreasing/NonDecreasing GH-88: Implement Grouping, Filtering, and Valiation of Increasing/Decreasing/NonIncreasing/NonDecreasing Feb 12, 2025
@tginsberg tginsberg merged commit eeb8098 into release/0.9.0 Feb 12, 2025
2 checks passed
@tginsberg tginsberg deleted the feature/increasing-decreasing branch February 12, 2025 00:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant