ChatGPT: In Java, given a hashmap of integer keys and integer values, how to sort it by its values in descending order. It even added a boolean parameter in case of needing to sort the values in ascending order without me even asking it