mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
23 lines
533 B
HTML
23 lines
533 B
HTML
<html>
|
|
<body>
|
|
Reports <code>Comparator</code> combinator constructs that can be simplified.
|
|
<p>Example:</p>
|
|
<pre><code>
|
|
c.thenComparing(Comparator.comparing(function));
|
|
|
|
Comparator.comparing(Map.Entry::getKey);
|
|
|
|
Collections.max(list, Comparator.reverseOrder());
|
|
</code></pre>
|
|
<p>After the quick-fixes are applied:</p>
|
|
<pre><code>
|
|
c.thenComparing(function)
|
|
|
|
Map.Entry.comparingByKey()
|
|
|
|
Collections.min(list, Comparator.naturalOrder());
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p><small>New in 2018.1</small></p>
|
|
</body>
|
|
</html> |