Enum Class AppModes

java.lang.Object
java.lang.Enum<AppModes>
de.klassenserver7b.danceinterpreter.AppModes
All Implemented Interfaces:
Serializable, Comparable<AppModes>, Constable

public enum AppModes extends Enum<AppModes>
  • Enum Constant Details

    • Spotify

      public static final AppModes Spotify
    • LocalMP3

      public static final AppModes LocalMP3
    • Playlist

      public static final AppModes Playlist
  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static AppModes[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AppModes valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDataProvider

      public SongDataProvider getDataProvider()
      Used to retrieve the correspondending SongDataProvider for the AppMode. Can be used to retrieve the currently playing song
      Returns:
      The static SongDataProvider of the AppModes
    • getId

      public int getId()
      Used to retrieve the id of the AppMode. Can be used to spimplify the Mode and to retrieve the corresponding AppModes by using fromId(int)
      Returns:
      The static id of the AppModes
    • fromId

      public static AppModes fromId(int id)
      Static accessor for retrieving a AppMode based on its id.
      Parameters:
      id - The id key of the requested AppMode.
      Returns:
      The AppModes that is referred to by the provided id. If the id is unknown, null is returned.