diff options
author | Alexander Alexeev | 2016-11-26 04:17:17 +0700 |
---|---|---|
committer | Alexander Alexeev | 2016-11-26 04:17:17 +0700 |
commit | 46a040d6ff07e2581ae461ac60d2abc736cc7c6d (patch) | |
tree | 13bd27c1c12b6846e780a54cc87e7a7b17639d0b /juick-server | |
parent | 55b09a6a3bc4a21201189d855e140308f05016fb (diff) |
status constants
Diffstat (limited to 'juick-server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/helpers/Status.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/helpers/Status.java b/juick-server/src/main/java/com/juick/server/helpers/Status.java index f68baae5..3c344193 100644 --- a/juick-server/src/main/java/com/juick/server/helpers/Status.java +++ b/juick-server/src/main/java/com/juick/server/helpers/Status.java @@ -6,9 +6,17 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Created by vitalyster on 25.07.2016. */ public class Status { - private String value; + private final String value; - public Status(String value) { + public static final Status OK = new Status("ok"); + public static final Status FAIL = new Status("Fail"); + public static final Status ERROR = new Status("Error"); + + public static Status getStatus(final String stringStatus) { + return new Status(stringStatus); + } + + private Status(String value) { this.value = value; } @@ -16,4 +24,9 @@ public class Status { public String getValue() { return value; } + + @Override + public String toString() { + return "value = " + value; + } } |