mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
21 lines
679 B
HTML
21 lines
679 B
HTML
<html>
|
|
<body>
|
|
Reports functional interface methods calls that are directly invoked on the definition of the lambda, method reference, or anonymous class.
|
|
Such method calls can be replaced with the body of the functional interface implementation.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
boolean contains(List<String> names, String name) {
|
|
return ((Predicate<String>)x -> {
|
|
return names.contains(x);
|
|
}).test(name);
|
|
}
|
|
</code></pre>
|
|
<p>When the quick-fix is applied, the method call changes to:</p>
|
|
<pre><code>
|
|
boolean contains(List<String> names, String name) {
|
|
return names.contains(name);
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |