Class Playlist


  • public class Playlist
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Playlist​(String sName)
      Class constructor - A simple structure that maintains a list of playlist items.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addItem​(String sName, int start, int length)
      Appends an item to this playlist
      java.util.List<PlaylistItem> getItems()
      Get the items in the playlist (returns a copy of the list)
      String getName()
      Returns the name of this playlist as defined in the XML definition file
      boolean getRepeat()  
      boolean open​(Stream s)
      Opens this playlist on the given stream...
      void removeItem​(int index)
      Remove an item from the list
      void setRepeat​(boolean repeat)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Playlist

        public Playlist​(String sName)
        Class constructor - A simple structure that maintains a list of playlist items.
        Parameters:
        sName - - name of playlist - as defined in the XML definition file
    • Method Detail

      • getItems

        public java.util.List<PlaylistItem> getItems()
        Get the items in the playlist (returns a copy of the list)
        Returns:
        items in the playlist (returns a copy of the list)
      • getRepeat

        public boolean getRepeat()
      • setRepeat

        public void setRepeat​(boolean repeat)
      • addItem

        public void addItem​(String sName,
                            int start,
                            int length)
        Appends an item to this playlist
        Parameters:
        sName - - item name
        start - - start seconds
        length - - playlength seconds
      • removeItem

        public void removeItem​(int index)
        Remove an item from the list
        Parameters:
        index - index of item to remove
      • open

        public boolean open​(Stream s)
        Opens this playlist on the given stream... stopping anything currently playing on that stream and switching over.
        Parameters:
        s - - stream to play on
        Returns:
        - true if successful
      • getName

        public String getName()
        Returns the name of this playlist as defined in the XML definition file
        Returns:
        name of this playlist