set benchmark tests

This commit is contained in:
mherbaghinyan 2018-09-11 15:58:47 +04:00
parent 23fc41db24
commit 2d15cb3b49
1 changed files with 10 additions and 2 deletions

View File

@ -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() {