I
- the type of the function argumentO
- The type of object the function returns.public interface Fn<I,O> extends Serializable
I
and
returning a value of type O
.
ƒ(I) ∈ O
This function type is often referred to as a "mapper" or "transformer", as it takes one value and based on it, yields another value. The function defines the mapping between values.
This function type is the most commonly used one, and is
promoted to be named without an index, whereas the other
function types are named as FnX
, where
X
denotes how many arguments it takes. I.e.
Fn0
, Fn2
, etc.
Modifier and Type | Method and Description |
---|---|
O |
$(I value)
Applies the function.
|
Copyright © 2016. All Rights Reserved.