Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

function compose method java 8

Function<Integer, Integer> multiply = (value) -> value * 2;
Function<Integer, Integer> add      = (value) -> value + 3;

Function<Integer, Integer> addThenMultiply = multiply.compose(add);

Integer result1 = addThenMultiply.apply(3);
System.out.println(result1);
Source by tutorials.jenkov.com #
 
PREVIOUS NEXT
Tagged: #function #compose #method #java
ADD COMMENT
Topic
Name
1+5 =