Function<T, R>

Description

A transformational interface that represents an operation intended to take in an argument and return an appropriate result

Abstract method

apply

default method(s)

andThen, compose

Popular usage

As a parameter to Stream’s map method

Primitive specializations

IntFunction, LongFunction, DoubleFunction, IntToDoubleFunction, DoubleToIntFunction, …

Get Functional Programming in Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.