Class CircularPlayListProvider
java.lang.Object
de.pottgames.tuningfork.jukebox.playlist.CircularPlayListProvider
- All Implemented Interfaces:
PlayListProvider
This provider keeps a list of
PlayLists and iterates through them in order. After a complete run, it starts again with the first PlayList in the
list.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds aPlayListto the end of the internal list.Adds allPlayLists from the given array to the end of the internal list.booleanhasNext()Returns true if aPlayListis available viaPlayListProvider.next().next()Returns the next PlayList.Removes aPlayListfrom the internal list.toString()
-
Constructor Details
-
CircularPlayListProvider
public CircularPlayListProvider()
-
-
Method Details
-
add
Adds aPlayListto the end of the internal list.- Parameters:
list- the playlist- Returns:
- the CircularPlayListProvider for chaining
-
addAll
Adds allPlayLists from the given array to the end of the internal list.- Parameters:
lists- an array of playlists- Returns:
- the CircularPlayListProvider for chaining
-
remove
Removes aPlayListfrom the internal list.- Parameters:
list- the playlist- Returns:
- the CircularPlayListProvider for chaining
-
next
Description copied from interface:PlayListProviderReturns the next PlayList. May be null if none is available.- Specified by:
nextin interfacePlayListProvider- Returns:
- the
PlayList
-
hasNext
public boolean hasNext()Description copied from interface:PlayListProviderReturns true if aPlayListis available viaPlayListProvider.next().- Specified by:
hasNextin interfacePlayListProvider- Returns:
- true if a
PlayListis available, false otherwise
-
toString
-