|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.baka.ambient.collection.local.AbstractTrackProvider sk.baka.ambient.collection.local.LibraryTrackProvider
public final class LibraryTrackProvider
Provides tracks from the library.
Constructor Summary | |
---|---|
LibraryTrackProvider(Random random)
Creates new library track provider. |
Method Summary | |
---|---|
protected List<TrackMetadataBean> |
getAlbumTracks(String album)
Fetches all tracks for given album. |
protected TrackMetadataBean |
getTrackFromCursor(Cursor c)
Converts current row to a track bean. |
protected Cursor |
newCursor(boolean albums)
Creates new cursor, depending on the value of albums
argument. |
Methods inherited from class sk.baka.ambient.collection.local.AbstractTrackProvider |
---|
close, getRandom, hasNext, next, remove, removeFromHistory, reset, setRandom |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LibraryTrackProvider(Random random)
random
- initial random value.Method Detail |
---|
protected List<TrackMetadataBean> getAlbumTracks(String album)
AbstractTrackProvider
getAlbumTracks
in class AbstractTrackProvider
album
- the album to fetch.
null
, may be empty if no such
album exists. Not required to be sorted.protected TrackMetadataBean getTrackFromCursor(Cursor c)
AbstractTrackProvider
AbstractTrackProvider.newCursor(boolean)
invoked with false
.
getTrackFromCursor
in class AbstractTrackProvider
c
- the cursor, never null
, always on a valid
line.
null
track instance.protected Cursor newCursor(boolean albums)
AbstractTrackProvider
albums
argument.
newCursor
in class AbstractTrackProvider
albums
- if true
then the cursor must provide string
album names only, sorted by a random order. If
false
then the cursor must provide tracks
sorted by random order.
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |