net.sf.ext.helliker.id3
Class NullsoftID3GenreTable

java.lang.Object
  extended bynet.sf.ext.helliker.id3.NullsoftID3GenreTable

public final class NullsoftID3GenreTable
extends java.lang.Object

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

Version History
1.4.1 - 2002.1023 by gruni
-Made Sourcecode compliant to the Sun CodingConventions
1.4 - by helliker
-initial release.

Version:
1.4.1
Author:
Jonathan Hilliker

Constructor Summary
NullsoftID3GenreTable()
           
 
Method Summary
static java.lang.String getGenre(int i)
          Return the corresponding String for the integer coded provided.
static int getGenre(java.lang.String str)
          Tries to find the string provided in the table and returns the corresponding int code if successful.
static java.lang.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 java.lang.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(java.lang.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 java.lang.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