Comparator<Map.Entry<String, RxGraphVO.SlbNode.SlbItem>> comp = Comparator.comparingInt(item -> item.getValue().getPercent()); Map<String, RxGraphVO.SlbNode.SlbItem> map = Maps.newHashMap(); RxGraphVO.SlbNode.SlbItem slbItem1 = new RxGraphVO.SlbNode.SlbItem(); slbItem1.setApiId("a"); slbItem1.setPercent(50); RxGraphVO.SlbNode.SlbItem slbItem2 = new RxGraphVO.SlbNode.SlbItem(); slbItem2.setApiId("b"); slbItem2.setPercent(50); map.put("it1", slbItem1); map.put("it2", slbItem2); map.entrySet().stream().sorted(comp); map.entrySet().forEach(item -> System.out.println(item.getKey()));