Java.util.function.Function: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
Line 26: Line 26:
=Composition Methods=
=Composition Methods=


* [https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html#andThen-java.util.function.Function- andThen(Function)]
* <code>[https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html#andThen-java.util.function.Function- andThen(Function)]</code>
* [https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html#compose-java.util.function.Function- compose(Function)]
* <code>[https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html#compose-java.util.function.Function- compose(Function)]</code>

Latest revision as of 19:03, 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.

Composition Methods