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

com.uwetrottmann.trakt5.enums.Status Maven / Gradle / Ivy

There is a newer version: 6.16.0
Show newest version
package com.uwetrottmann.trakt5.enums;

import java.util.HashMap;
import java.util.Map;

public enum Status implements TraktEnum {

    ENDED("ended"),
    RETURNING("returning series"),
    CANCELED("canceled"),
    IN_PRODUCTION("in production");

    private final String value;

    private Status(String value) {
        this.value = value;
    }

    private static final Map STRING_MAPPING = new HashMap<>();

    static {
        for (Status via : Status.values()) {
            STRING_MAPPING.put(via.toString().toUpperCase(), via);
        }
    }

    public static Status fromValue(String value) {
        return STRING_MAPPING.get(value.toUpperCase());
    }

    @Override
    public String toString() {
        return value;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy