set benchmark tests
This commit is contained in:
parent
23fc41db24
commit
2d15cb3b49
|
@ -17,8 +17,16 @@ public class SortHashMap {
|
|||
//arrayListSortByValue();
|
||||
//arrayListSortByKey();
|
||||
|
||||
treeSetByKey();
|
||||
treeSetByValue();
|
||||
//treeSetByKey();
|
||||
//treeSetByValue();
|
||||
|
||||
sortStream();
|
||||
}
|
||||
|
||||
private static void sortStream() {
|
||||
map.entrySet().stream()
|
||||
.sorted(Map.Entry.<String, Employee>comparingByKey().reversed())
|
||||
.forEach(System.out::println);
|
||||
}
|
||||
|
||||
private static void treeSetByValue() {
|
||||
|
|
Loading…
Reference in New Issue