Remove all remaining traces of ImmutableHashMap
Some checks failed
build-and-test / build (push) Failing after 1m58s
build-and-test / test (push) Failing after 2m4s
build-and-test / generate-javadoc (push) Failing after 2m7s

This commit is contained in:
JeremyStar™ 2024-11-25 01:59:16 +01:00
parent 7d15c5c73d
commit 2db14012f8
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -19,12 +19,12 @@
package de.staropensource.engine.notification; package de.staropensource.engine.notification;
import de.staropensource.engine.base.type.immutable.ImmutableHashMap;
import de.staropensource.engine.notification.type.Notification; import de.staropensource.engine.notification.type.Notification;
import de.staropensource.engine.notification.type.NotificationState; import de.staropensource.engine.notification.type.NotificationState;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -49,14 +49,14 @@ public final class NotificationManager {
private NotificationManager() {} private NotificationManager() {}
/** /**
* Returns an {@link ImmutableHashMap} containing all * Returns an immutable map containing all
* registered notifications and their current states. * registered notifications and their current states.
* *
* @return map of registered notifications * @return map of registered notifications
* @since v1-alpha6 * @since v1-alpha6
*/ */
public static @NotNull Map<@NotNull Notification, @NotNull NotificationState> getNotifications() { public static @NotNull Map<@NotNull Notification, @NotNull NotificationState> getNotifications() {
return new ImmutableHashMap<>(notifications); return Collections.unmodifiableMap(notifications);
} }
/** /**