mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
18 lines
501 B
Java
18 lines
501 B
Java
// "Replace nested function call with andThen call" "true-preview"
|
|
|
|
import java.util.Collections;
|
|
import java.util.function.BinaryOperator;
|
|
import java.util.function.Function;
|
|
import java.util.function.UnaryOperator;
|
|
|
|
public class Main {
|
|
private void testFn() {
|
|
Function<String, Integer> lookup = Integer::parseInt;
|
|
UnaryOperator<String> selector = String::trim;
|
|
BinaryOperator<Integer> min = Math::min;
|
|
String foo = "xyz";
|
|
|
|
int res = min.andThen(Math::abs).apply(-1, -2);
|
|
}
|
|
}
|