com.jakewharton.trakt.enumerations.Gender Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trakt-java Show documentation
Show all versions of trakt-java Show documentation
A Java wrapper around the Trakt RESTful API and a simple DSL for easy interaction.
The newest version!
package com.jakewharton.trakt.enumerations;
import java.util.HashMap;
import java.util.Map;
import com.jakewharton.trakt.TraktEnumeration;
public enum Gender implements TraktEnumeration {
Male("male"),
Female("female");
private final String value;
private Gender(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
private static final Map STRING_MAPPING = new HashMap();
static {
for (Gender via : Gender.values()) {
STRING_MAPPING.put(via.toString().toUpperCase(), via);
}
}
public static Gender fromValue(String value) {
return STRING_MAPPING.get(value.toUpperCase());
}
}