Skip to content

Instantly share code, notes, and snippets.

@HoweChen
Created December 18, 2019 07:02
Show Gist options
  • Save HoweChen/684ad691438a020c766ddb199c1ea951 to your computer and use it in GitHub Desktop.
Save HoweChen/684ad691438a020c766ddb199c1ea951 to your computer and use it in GitHub Desktop.
[转换Map里的所有key变为大写]#Java
Map<String, List<Long>> capitalKeyToValueMap = procDefInfoDto.getPermissionToRole()
.entrySet()
.stream()
.collect(Collectors.toMap(stringListEntry -> stringListEntry.getKey().toUpperCase(), Map.Entry::getValue));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment