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

com.lajospolya.spotifyapiwrapper.enumeration.Explicit Maven / Gradle / Ivy

Go to download

This project wraps the Spotify public API in order to allow users to intuitively use it

There is a newer version: 3.0.RELEASE
Show newest version
package com.lajospolya.spotifyapiwrapper.enumeration;

import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.lajospolya.spotifyapiwrapper.enumeration.adapter.ExplicitAdapter;

@JsonAdapter(ExplicitAdapter.class)
public enum Explicit
{
    @SerializedName("true")
    TRUE("true"),
    @SerializedName("false")
    FALSE("false"),
    @SerializedName("unknown")
    UNKNOWN("unknown");

    private String type;

    Explicit(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }

    public static Explicit getFromString(String type)
    {
        if(TRUE.type.equals(type))
        {
            return TRUE;
        }
        else if(FALSE.type.equals(type))
        {
            return FALSE;
        }
        return UNKNOWN;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy