Skip to content

Add java.util.function.Function and Consumer interop overloads in Fun… - #323

Open
hardik56-git wants to merge 1 commit into
twitter:developfrom
hardik56-git:add-jdk-function-interop
Open

Add java.util.function.Function and Consumer interop overloads in Fun…#323
hardik56-git wants to merge 1 commit into
twitter:developfrom
hardik56-git:add-jdk-function-interop

Conversation

@hardik56-git

Copy link
Copy Markdown

…ction.scala

Add func[T, R](f: juf.Function[T, R]) and cons[T](f: juf.Consumer[T]) overloads to com.twitter.util.Function object, following the existing pattern of func0 for java.util.function.Supplier. This improves Java 8+ interop by allowing standard JDK functional interfaces to be converted to Twitter's Function types.

Add corresponding tests in FunctionCompilationTest.java for both new overloads covering anonymous class and lambda usage.

…ction.scala

Add func[T, R](f: juf.Function[T, R]) and cons[T](f: juf.Consumer[T])
overloads to com.twitter.util.Function object, following the existing
pattern of func0 for java.util.function.Supplier. This improves Java 8+
interop by allowing standard JDK functional interfaces to be converted
to Twitter's Function types.

Add corresponding tests in FunctionCompilationTest.java for both new
overloads covering anonymous class and lambda usage.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants