Java.util.function.Function: Difference between revisions
Jump to navigation
Jump to search
Line 21: | Line 21: | ||
=Primitive Type Functions= | =Primitive Type Functions= | ||
* < | * <code>[https://docs.oracle.com/javase/8/docs/api/java/util/function/IntFunction.html IntFunction<T>]</code> a function that receives an <tt>int</tt> argument and returns an argument of type T. | ||
* < | * <code>[https://docs.oracle.com/javase/8/docs/api/java/util/function/ToIntFunction.html ToIntFunction<T>]</code> a function that receives an argument of type T and returns an <tt>int</tt>. | ||
=Composition Methods= | =Composition Methods= |
Revision as of 19:02, 1 September 2021
External
Internal
Overview
@FunctionalInterface
public interface Function<I, O> {
O apply(I input);
....
}
Primitive Type Functions
IntFunction<T>
a function that receives an int argument and returns an argument of type T.ToIntFunction<T>
a function that receives an argument of type T and returns an int.