♻️ Move output generation to state
[rhynodge.git] / src / main / java / net / pterodactylus / rhynodge / states / FileState.java
index 3c2e999..983500d 100644 (file)
@@ -17,6 +17,8 @@
 
 package net.pterodactylus.rhynodge.states;
 
+import javax.annotation.Nonnull;
+
 import net.pterodactylus.rhynodge.State;
 
 /**
@@ -77,6 +79,11 @@ public class FileState extends AbstractState {
        // ACCESSORS
        //
 
+       @Override
+       public boolean isEmpty() {
+               return !exists;
+       }
+
        /**
         * Returns whether the file exists.
         *
@@ -114,6 +121,12 @@ public class FileState extends AbstractState {
                return modificationTime;
        }
 
+       @Nonnull
+       @Override
+       protected String plainText() {
+               return toString();
+       }
+
        //
        // OBJECT METHODS
        //