Skip to content

Functions.andThen #3708

Open
Open
@orionll

Description

There are two methods in java.util.function.Function: compose and andThen. But Functions has only compose. Can we add andThen too?
It can be useful for chaining of method references (and more natural than compose):

Function<Employee, String> f = Functions.andThen(Employee::getName, String::toLowerCase);

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions