Time:09-29
CodePudding user response:
didn't get get no Map key value is what you mean If you want to get all the inside of the Map of all the key, can the following List Keys=list. Stream (). FlatMap (m - & gt; M.k eySet (). The stream ()). Collect (Collectors. ToList ()); If you don't repeat the key, which can be the following Set Keys=list. Stream (). FlatMap (m - & gt; M.k eySet (). The stream ()). Collect (Collectors. ToSet ());
Set AllKey=list. Stream (). The map (the map: : keySet). FlatMap (Collection: : stream). Collect (Collectors. ToSet ());
Page link:https//www.codepudding.com/Backend/40907.html