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

se.michaelthelin.spotify.enums.AlbumGroup Maven / Gradle / Ivy

There is a newer version: 9.0.0-RC1
Show newest version
package se.michaelthelin.spotify.enums;

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

/**
 * Compare to [AlbumType] this field represents relationship between the artist and the album.
 */
public enum AlbumGroup {

  ALBUM("album"),
  APPEARS_ON("appears_on"),
  COMPILATION("compilation"),
  SINGLE("single");

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

  static {
    for (AlbumGroup albumGroup : AlbumGroup.values()) {
      map.put(albumGroup.group, albumGroup);
    }
  }

  public final String group;

  AlbumGroup(final String group) {
    this.group = group;
  }

  public static AlbumGroup keyOf(String type) {
    return map.get(type);
  }

  /**
   * Get the album group as a string.
   *
   * @return Album group as string.
   */
  public String getGroup() {
    return group;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy