feature: #95 | Add composition, toUnchecked, identity, and ThrowingPredicate to throwing functional interfaces#112
Conversation
…rowingPredicate to throwing functional interfaces
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughAdded composition and conversion utilities to Throwing* functional interfaces: Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Enhances all Throwing functional interfaces with composition support, JDK interop, and introduces a new
ThrowingPredicate<T>interface.Changes
ThrowingFunction<T, R>andThen(ThrowingFunction)— compose two functions in sequencecompose(ThrowingFunction)— compose with a before-functiontoUnchecked()— adapt to standard Function for use in streamsidentity()— static factory returning an identity functionThrowingBiFunction<T, U, R>andThen(ThrowingFunction)— post-map the resulttoUnchecked()— adapt to standard BiFunctionThrowingConsumer<T> / ThrowingBiConsumer<T, U>andThen(...)— chain two consumers in sequencetoUnchecked()— adapt to standard Consumer / BiConsumerThrowingRunnable / ThrowingSupplier<T>toUnchecked()— adapt to standard Runnable / SupplierNew:
ThrowingPredicate<T>and, or, negate— boolean composition with short-circuit evaluationisEqual(Object)— static null-safe equality predicatenot(ThrowingPredicate)— static negation factory (mirrors JDK 11 Predicate.not)toUnchecked()— adapt to standard PredicateSummary by CodeRabbit
New Features
toUnchecked()conversion method to adapt throwing functions to standard Java functional interfacesThrowingPredicateinterface with logical combinators (and, or, negate)identity()andisEqual()Tests