All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jakewharton.trakt.enumerations.Gender Maven / Gradle / Ivy

Go to download

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());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy