1 package net.pterodactylus.rhynodge.states;
3 import java.util.Optional;
5 import net.pterodactylus.rhynodge.State;
7 import com.fasterxml.jackson.annotation.JsonProperty;
10 * {@link State} implementation that can expose itself as plain text and/or
13 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
15 public class OutputState extends AbstractState {
17 private final Optional<String> plainTextOutput;
18 private final Optional<String> htmlOutput;
20 public OutputState() {
21 this(Optional.<String>empty(), Optional.<String>empty());
24 public OutputState(Optional<String> plainTextOutput, Optional<String> htmlOutput) {
25 this.plainTextOutput = plainTextOutput;
26 this.htmlOutput = htmlOutput;
30 public boolean isEmpty() {
31 return !plainTextOutput.isPresent() && !htmlOutput.isPresent();
34 public Optional<String> plainTextOutput() {
35 return plainTextOutput;
38 public Optional<String> htmlOutput() {