mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
IDEA-67951 Suggest comparator type in Collections.sort()
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Collections;
|
||||
|
||||
public class Foo {
|
||||
private List<String> myList;
|
||||
|
||||
private void sort() {
|
||||
Collections.sort(myList, new Comparator<String>() {
|
||||
@Override
|
||||
public int compare(String o1, String o2) {
|
||||
<selection>return 0; //To change body of implemented methods use File | Settings | File Templates.</selection>
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import java.util.List;
|
||||
import java.util.Collections;
|
||||
|
||||
public class Foo {
|
||||
private List<String> myList;
|
||||
|
||||
private void sort() {
|
||||
Collections.sort(myList, new Comparator<caret>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user