♻️ Move output generation to state
[rhynodge.git] / src / main / java / net / pterodactylus / rhynodge / states / HtmlState.java
index d2731f7..83cd36d 100644 (file)
@@ -17,6 +17,9 @@
 
 package net.pterodactylus.rhynodge.states;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
 import net.pterodactylus.rhynodge.State;
 
 import org.jsoup.nodes.Document;
@@ -74,6 +77,19 @@ public class HtmlState extends AbstractState {
                return document;
        }
 
+       @Nonnull
+       @Override
+       protected String plainText() {
+               //noinspection ConstantConditions
+               return htmlText();
+       }
+
+       @Nullable
+       @Override
+       protected String htmlText() {
+               return document.toString();
+       }
+
        //
        // OBJECT METHODS
        //