mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 00:20:54 +07:00
20 lines
687 B
Java
20 lines
687 B
Java
import java.util.Map;
|
|
import java.util.Set;
|
|
import java.util.TreeSet;
|
|
import java.util.concurrent.atomic.LongAdder;
|
|
|
|
class Test {
|
|
|
|
{
|
|
Set<Map.Entry<String, Integer>> sort = new TreeSet<>((x, y) -> Integer.compare(x.getValue(), y.getValue()));
|
|
Set<Map.Entry<String, LongAdder>> sort2 = new TreeSet<>((x, y) -> Long.compare(x.getValue().longValue(), y.getValue().longValue()));
|
|
|
|
Set<Map.Entry<String, Integer>> sort3 = new TreeSet<>((x, y) -> {
|
|
return Integer.compare(x.getValue(), y.getValue());
|
|
});
|
|
|
|
Set<Map.Entry<String, LongAdder>> sort4 = new TreeSet<>((x, y) -> {
|
|
return Long.compare(x.getValue().longValue(), y.getValue().longValue());
|
|
});
|
|
}
|
|
} |