|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mymedialite.data.KDDCupItems
public final class KDDCupItems
Represents KDD Cup 2011 items like album, track, artist, or genre.
Constructor Summary | |
---|---|
KDDCupItems(int size)
Create item information object. |
Method Summary | |
---|---|
int |
getAlbum(int item_id)
Get the album for a given item. |
int |
getArtist(int item_id)
Get the artist for a given item. |
int[] |
getGenres(int item_id)
Get a list of genres for a given item. |
KDDCupItemType |
getType(int item_id)
Get the type of a given item. |
boolean |
hasAlbum(int item_id)
Check whether the given item is associated with an album. |
boolean |
hasArtist(int item_id)
Check whether the given item is associated with an artist. |
boolean |
hasGenres(int item_id)
Check whether the given item is associated with one or more genres. |
void |
insert(int item_id,
KDDCupItemType type,
int album,
int artist,
int[] genres)
Insert information about an entry to the data structure. |
java.lang.String |
toString()
Gives a textual summary of the item data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KDDCupItems(int size)
size
- the number of itemsMethod Detail |
---|
public void insert(int item_id, KDDCupItemType type, int album, int artist, int[] genres)
item_id
- the item IDtype
- the KDDCupItemType of the itemalbum
- the album ID if the item is a track or album, -1 otherwiseartist
- the artist ID if the item is a track, an album, or an artist, -1 otherwisegenres
- a (possibly empty or null) list of genre IDspublic KDDCupItemType getType(int item_id)
item_id
- the item ID
public int[] getGenres(int item_id)
item_id
- the item ID
public int getArtist(int item_id)
item_id
- the item ID
public int getAlbum(int item_id)
item_id
- the item ID
public boolean hasAlbum(int item_id)
item_id
- the item ID
public boolean hasArtist(int item_id)
item_id
- the item ID
public boolean hasGenres(int item_id)
item_id
- the item ID
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |