se.michaelthelin.spotify.enums.ReleaseDatePrecision Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spotify-web-api-java Show documentation
Show all versions of spotify-web-api-java Show documentation
A Java client for Spotify's Web API
package se.michaelthelin.spotify.enums;
import java.util.HashMap;
import java.util.Map;
/**
* An enumeration of all possible release date precisions.
*/
public enum ReleaseDatePrecision {
DAY("day"),
MONTH("month"),
YEAR("year");
private static final Map map = new HashMap<>();
static {
for (ReleaseDatePrecision releaseDatePrecision : ReleaseDatePrecision.values()) {
map.put(releaseDatePrecision.precision, releaseDatePrecision);
}
}
public final String precision;
ReleaseDatePrecision(final String precision) {
this.precision = precision;
}
public static ReleaseDatePrecision keyOf(String precision) {
return map.get(precision);
}
/**
* Get the release date precision as a string.
*
* @return The release date precision as a string.
*/
public String getPrecision() {
return precision;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy