I am new to java 8 and would like to write a function which sorts hashmap by values and if values are the same sort by keys.
To sort the hashmap by values:
<