diff options
Diffstat (limited to 'src/de/animux/android/andmal/api/manga/State.java')
-rw-r--r-- | src/de/animux/android/andmal/api/manga/State.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/de/animux/android/andmal/api/manga/State.java b/src/de/animux/android/andmal/api/manga/State.java new file mode 100644 index 0000000..a39fe78 --- /dev/null +++ b/src/de/animux/android/andmal/api/manga/State.java @@ -0,0 +1,38 @@ +package de.animux.android.andmal.api.manga; + +import de.animux.android.andmal.api.MalState; + +public enum State implements MalState { + READING (1, "Reading"), + COMPLETED (2, "Completed"), + ONHOLD (3, "On Hold"), + DROPPED (4, "Dropped"), + PLANTOREAD (6, "Plan to read"); + + 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 |