|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.musicontroller.songselection.AdvancedRandomSongSelector
public class AdvancedRandomSongSelector
Constructor Summary | |
---|---|
AdvancedRandomSongSelector()
|
Method Summary | |
---|---|
void |
addBandKnowledge(java.lang.Long bandid,
int playcount,
int skipcount)
Adds knowledge about a Band. |
void |
addBandPlay(long bandid)
Informs the SongSelector that a song of a certain Band has been played. |
void |
addBandSkip(long bandid)
Informs the SongSelector that a song of a certain Band has been skipped. |
void |
addKeywordKnowledge(java.lang.Long keywordid,
int playcount,
int skipcount)
Adds knowledge about a Keyword. |
void |
addKeywordPlay(long keywordid)
Informs the SongSelector that a song of a certain Keyword has been played. |
void |
addKeywordSkip(long keywordid)
Informs the SongSelector that a song of a certain Keyword has been skipped. |
Dao |
getDao()
|
int |
getPenalty(Band band)
Returns an integer, representing the penalty of a Band. |
int |
getPenalty(Keyword keyword)
Returns an integer, representing the penalty of a Keyword. |
Song |
selectSong(java.util.List<Song> candidates,
LastPlayedContainer lpc,
IUser user)
Returns one Song, which is selected using the Advanced Random algorithm. |
void |
setDao(Dao dao)
Setter for the DAO. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdvancedRandomSongSelector()
Method Detail |
---|
public Song selectSong(java.util.List<Song> candidates, LastPlayedContainer lpc, IUser user)
SongSelector
selectSong
in interface SongSelector
candidates
- The list of Songs that are requested. If this parameter
is null, the result is null. If the set of candidates is empty the
result is null.lpc
- The collection of the last songs playeduser
- The User
public void setDao(Dao dao)
dao
- The DAO.public Dao getDao()
public int getPenalty(Band band)
band
- The Band to check the popularity for.
public int getPenalty(Keyword keyword)
keyword
- The Keyword to check the popularity for.
public void addBandKnowledge(java.lang.Long bandid, int playcount, int skipcount)
bandid
- The bandidplaycount
- The amount of plays for this bandskipcount
- The amount of skips for this bandpublic void addKeywordKnowledge(java.lang.Long keywordid, int playcount, int skipcount)
keywordid
- The keywordidplaycount
- The amount of plays for this keywordskipcount
- The amount of skips for this keywordpublic void addBandPlay(long bandid)
SongSelector
addBandPlay
in interface SongSelector
public void addBandSkip(long bandid)
SongSelector
addBandSkip
in interface SongSelector
public void addKeywordPlay(long keywordid)
SongSelector
addKeywordPlay
in interface SongSelector
public void addKeywordSkip(long keywordid)
SongSelector
addKeywordSkip
in interface SongSelector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |