groovy reverse TreeMap$Values code example Example: treemap in reverse order Map treemap = new TreeMap<>(Collections.reverseOrder());