diff --git a/slides.md b/slides.md index 9a053bb..3fdb960 100644 --- a/slides.md +++ b/slides.md @@ -166,12 +166,8 @@ ```java public sealed interface Json { - enum JsonNull implements Json { - NULL - } - enum JsonBoolean implements Json { - TRUE, FALSE - } + enum JsonNull implements Json { NULL } + enum JsonBoolean implements Json { TRUE, FALSE } record JsonString(String value) implements Json {} record JsonNumber(Number value) implements Json {} record JsonObject(Map value) implements Json {} diff --git a/snippets/Json.java b/snippets/Json.java index ca4642b..b51dc1b 100644 --- a/snippets/Json.java +++ b/snippets/Json.java @@ -4,12 +4,8 @@ import java.util.Map; public sealed interface Json { - enum JsonNull implements Json { - NULL - } - enum JsonBoolean implements Json { - TRUE, FALSE - } + enum JsonNull implements Json { NULL } + enum JsonBoolean implements Json { TRUE, FALSE } record JsonString(String value) implements Json {} record JsonNumber(Number value) implements Json {} record JsonObject(Map value) implements Json {}