summaryrefslogtreecommitdiffstats
path: root/src/de/animux/android/andmal/api/anime/State.java
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-08-17 01:56:11 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2010-08-17 02:19:39 +0200
commitd773a39a1f07ae4b8021222a47c16b048d7fd435 (patch)
tree3558cbd77c8e6aa54f5593b556fcbf330fea0120 /src/de/animux/android/andmal/api/anime/State.java
downloadAndMAL-d773a39a1f07ae4b8021222a47c16b048d7fd435.tar.gz
AndMAL-d773a39a1f07ae4b8021222a47c16b048d7fd435.tar.xz
AndMAL-d773a39a1f07ae4b8021222a47c16b048d7fd435.zip
initial commit
Diffstat (limited to '')
-rw-r--r--src/de/animux/android/andmal/api/anime/State.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/de/animux/android/andmal/api/anime/State.java b/src/de/animux/android/andmal/api/anime/State.java
new file mode 100644
index 0000000..639b761
--- /dev/null
+++ b/src/de/animux/android/andmal/api/anime/State.java
@@ -0,0 +1,36 @@
+package de.animux.android.andmal.api.anime;
+
+public enum State {
+ WATCHING (1, "Watching"),
+ COMPLETED (2, "Completed"),
+ ONHOLD (3, "On Hold"),
+ DROPPED (4, "Dropped"),
+ PLANTOWATCH (6, "Plan to watch");
+
+ private final int id;
+ private final String name;
+
+ State(int id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return name;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ static State valueOf(int id) {
+ for (State s : State.values()) {
+ if (s.getId() == id) {
+ return s;
+ }
+ }
+
+ return null;
+ }
+} \ No newline at end of file