Reputation: 412
public static Function<List<Object>, Function> required = objects -> (Function<FunctionKeeper, Object>) (wrapper) -> {
if (LIVRUtils.isNoValue(wrapper.getValue())) {
return "REQUIRED";
}
return "";
};
How do I convert this Java8 lambda approach to Kotlin lambda?
Upvotes: 2
Views: 575
Reputation: 3723
val required = { objects: List<Any> ->
{ wrapper: FunctionKeeper ->
if (LIVRUtils.isNoValue(wrapper.value)) {
"REQUIRED"
} else {
""
}
}
}
Note that objects
is not used in your function.
Upvotes: 1