|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Random> sk.baka.ambient.playlist.Random
public enum Random
Random play.
Enum Constant Summary | |
---|---|
ALBUM
A random album is selected which is then played regularly (in album order). |
|
ALBUM_PLAYLIST
A random album is selected which is then played in the playlist order (order in which tracks appear in the playlist). |
|
ALBUM_TRACK
A random album is selected and random tracks are played from it. |
|
NONE
No random play, tracks will be played as ordered by the playlist. |
|
TRACK
|
Method Summary | |
---|---|
boolean |
groupsByAlbum()
Checks if this random mode groups tracks by albums. |
static List<PlaylistItem> |
randomize(Random random,
List<? extends PlaylistItem> playlist,
PlaylistItem first)
Randomizes given playlist as specified by the Random
constant. |
static Random |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Random[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Random NONE
public static final Random TRACK
public static final Random ALBUM
public static final Random ALBUM_PLAYLIST
public static final Random ALBUM_TRACK
Method Detail |
---|
public static Random[] values()
for (Random c : Random.values()) System.out.println(c);
public static Random valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static List<PlaylistItem> randomize(Random random, List<? extends PlaylistItem> playlist, PlaylistItem first)
Random
constant.
random
- the random constantplaylist
- the playlist to randomize, will not be changed.first
- place this track first if possible. May be null
if it doesn't matter which track is the first one.
public final boolean groupsByAlbum()
true
if tracks are grouped by albums (ALBUM
,
ALBUM_PLAYLIST
and ALBUM_TRACK
) ,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |