Beautify Miscellaneous#getMapValue

This commit is contained in:
JeremyStar™ 2024-06-27 20:09:57 +02:00
parent 5c1fba4ef6
commit 74d8978f20
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -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());
}
/**