RFR: 8317993: Add capturing factories to classes in java.util.function package [v5]

Chen Liang liach at openjdk.org
Wed Oct 18 09:14:52 UTC 2023


On Tue, 17 Oct 2023 08:22:05 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Pretty
>
> src/java.base/share/classes/java/util/function/UnaryOperator.java line 68:
> 
>> 66:      * @see Function#andThen(Function)
>> 67:      */
>> 68:     default UnaryOperator<T> andThenUnary(UnaryOperator<T> after) {
> 
> What are your comments on this proposed method?

Just curious, do we have any idea how extensively `UnaryOperator` is used as a parameter type in user code compared to plain `Function<T, T>`? If it's not preferred over `Function<T, T>`, this new method might not be very useful.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16213#discussion_r1363531469


More information about the core-libs-dev mailing list