Mp3dings 
20100427

helliker.id3
Class NullsoftID3GenreTable

java.lang.Object
  extended by helliker.id3.NullsoftID3GenreTable

public final class NullsoftID3GenreTable
extends Object

This class keeps track of all the genre numbers and their corresponding Strings based on the ID3 and Nullsoft standards.


Constructor Summary
NullsoftID3GenreTable()
           
 
Method Summary
static String getGenre(int i)
          Return the corresponding String for the integer coded provided.
static int getGenre(String str)
          Tries to find the string provided in the table and returns the corresponding int code if successful.
static String[] getGenres()
          Returns an array of all the genres which can be used to put into an OptionPane or some other component for easy display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullsoftID3GenreTable

public NullsoftID3GenreTable()
Method Detail

getGenre

public static String getGenre(int i)
Return the corresponding String for the integer coded provided. Returns empty String if the code returned is invalid (less than 0 or greater than 125).

Parameters:
i - the genre code
Returns:
the genre String or null if the genre code is invalid

getGenre

public static int getGenre(String str)
Tries to find the string provided in the table and returns the corresponding int code if successful. Returns -1 if the genres is not found in the table.

Parameters:
str - the genre to search for
Returns:
the integer code for the genre or -1 if the genre is not found

getGenres

public static String[] getGenres()
Returns an array of all the genres which can be used to put into an OptionPane or some other component for easy display.

Returns:
an array of genres

Mp3dings 
20100427