package javazoom.jlGui.playlist;
/**
* Playlist.
*/
import java.util.Collection;
/**
* Playlist.
* This interface defines method that a playlist should implement.
* A playlist provides a collection of item to play and a cursor to know
* which item is playing.
*/
public interface Playlist
{
// Next methods will be called by the Playlist UI.
/**
* Loads playlist.
*/
public void load(String filename);
/**
* Saves playlist.
*/
public void save(String filename);
/**
* Adds item at a given position in the playlist.
*/
public void addItemAt(PlaylistItem pli, int pos);
/**
* Searchs and removes item from the playlist.
*/
public void removeItem(PlaylistItem pli);
/**
* Removes item at a given position from the playlist.
*/
public void removeItemAt(int pos);
/**
* Append item at the end of the playlist.
*/
public void appendItem(PlaylistItem pli);
/**
* Sorts items of the playlist.
*/
public void sortItems(int sortmode);
/**
* Returns item at a given position from the playlist.
*/
public PlaylistItem getItemAt(int pos);
/**
* Returns a collection of playlist items.
*/
public Collection getAllItems();
/**
* Returns then number of items in the playlist.
*/
public int getPlaylistSize();
// Next methods will be used by the Player
/**
* Randomly re-arranges the playlist.
*/
public void shuffle();
/**
* Returns item matching to the cursor.
*/
public PlaylistItem getCursor();
/**
* Computes cursor position (next).
*/
public void nextCursor();
/**
* Computes cursor position (previous).
*/
public void previousCursor();
}