how to use a static method as a stream Function

Albert Cardona <[email protected]> Sat, 30 Dec 2023 22:26:22 +0000
Newsgroups gmane.comp.lang.jython.devel
Message-ID <CAJj13__hVVpk-cQQb7HnoWy1iDiJ2c_BWYFOb_c-L_MMC25-Yw@mail.gmail.com>
Hi all,

Is there any way to use something akin to the double colon notation,
to use a static method as a Function in a collection stream?

Otherwise, if I have to instantiate it as a jython class that then
delegates to the static method, performance suffers greatly.

For example, how can one use java.lang.Float's sum method, which takes
two floating-point numbers as arguments, in a reduce operation?

Thank you.

Best wishes,

Albert