|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.baka.ambient.collection.CategoryItem
public final class CategoryItem
A single category, may be an artist, an album or a genre.
Nested Class Summary | |
---|---|
static class |
CategoryItem.Builder
Builds the CategoryItem . |
Field Summary | |
---|---|
int |
albums
Contains a number of albums for given artist or genre. |
CategoryEnum |
category
The category of this item, must not be null . |
Object |
id
The collection-strategy-dependent ID, may be null . |
String |
name
The name of the item, may be null if the name is missing. |
int |
songs
Contains a number of songs for given artist, genre or album. |
String |
year
In case of an album the year may be specified. |
Constructor Summary | |
---|---|
CategoryItem(Object id,
String name,
String year,
CategoryEnum category,
int albums,
int songs)
Creates new category item instance. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getDisplayableName()
Returns displayable name (the "[empty]" string instead of null ). |
String |
getDisplayableYear()
Returns displayable year (the "[empty]" string instead of null ). |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final Object id
null
.
public final String name
null
if the name is missing.
public final String year
null
if not
known.
public final CategoryEnum category
null
.
public final int albums
CategoryEnum.Title
and CategoryEnum.Album
categories. May
be -1 if not known.
public final int songs
CategoryEnum.Title
. May be -1 if not known.
Constructor Detail |
---|
public CategoryItem(Object id, String name, String year, CategoryEnum category, int albums, int songs)
id
- the collection-strategy-dependent ID, may be null
name
- the name of the item.year
- in case of an album the year may be specified.
null
if not known.category
- The category of this item, must not be null
.albums
- Contains a number of albums for given artist or genre. Equals
to 1 for CategoryEnum.Title
and
CategoryEnum.Album
categories. May be -1 if not known.songs
- Contains a number of songs for given artist, genre or album.
Equals to 1 for CategoryEnum.Title
. May be -1 if not
known.Method Detail |
---|
public String getDisplayableName()
null
).
public String getDisplayableYear()
null
).
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |