Beautify Miscellaneous#getMapValue
This commit is contained in:
parent
5c1fba4ef6
commit
74d8978f20
1 changed files with 5 additions and 1 deletions
|
@ -93,7 +93,11 @@ public final class Miscellaneous {
|
|||
* @since 1-alpha0
|
||||
*/
|
||||
public static Set<?> getMapValue(@NotNull Map<?, ?> map, @Nullable Object value) {
|
||||
return map.entrySet().stream().filter(entry -> Objects.equals(entry.getValue(), value)).map(Map.Entry::getKey).collect(Collectors.toSet());
|
||||
return map
|
||||
.entrySet().stream()
|
||||
.filter(entry -> Objects.equals(entry.getValue(), value))
|
||||
.map(Map.Entry::getKey)
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue