com.antelmann.cddb
Class Genre
java.lang.Object
com.antelmann.cddb.Genre
- All Implemented Interfaces:
- Serializable, Comparable<Genre>
public class Genre
- extends Object
- implements Serializable, Comparable<Genre>
A Genre specifies the category for a composition.
- Author:
- Holger Antelmann
- See Also:
Contribution,
Track,
Composition,
Resource,
Serialized Form
|
Constructor Summary |
protected |
Genre(String description)
|
BLUES
public static final Genre BLUES
CLASSICAL
public static final Genre CLASSICAL
COUNTRY
public static final Genre COUNTRY
DATA
public static final Genre DATA
FOLK
public static final Genre FOLK
JAZZ
public static final Genre JAZZ
MISC
public static final Genre MISC
NEWAGE
public static final Genre NEWAGE
REGGAE
public static final Genre REGGAE
ROCK
public static final Genre ROCK
SOUNDTRACK
public static final Genre SOUNDTRACK
UNKNOWN
public static final Genre UNKNOWN
Genre
protected Genre(String description)
isKnownGenre
public static boolean isKnownGenre(Genre genre)
getGenre
public static Genre getGenre(String description)
throws NoSuchElementException
- convenience method that checks whether the given description
matches one of the standard categories (using case-insensitive
comparison), in which case the static member is returned;
otherwise, NoSuchElementException is thrown.
- Throws:
NoSuchElementException - if the given description doesn't match
with a known genre
getKnownGenres
public static Genre[] getKnownGenres()
compareTo
public int compareTo(Genre g)
- Specified by:
compareTo in interface Comparable<Genre>
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads