forked from erasmuss22/Music-Player
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibraryInterface.java
More file actions
63 lines (55 loc) · 1.45 KB
/
LibraryInterface.java
File metadata and controls
63 lines (55 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* Abstract interface to a music library, consisting of a set of songs.
*
* @author Ben Liblit
*/
public interface LibraryInterface {
/**
* Return the songs from this library that have the given genre.
*
* @param genre
* genre of songs to return
* @return set of songs with the given genre
*/
SimpleSet<Song> songsHavingGenre(String genre);
/**
* Return the songs from this library that are by the given artist.
*
* @param artist
* artist of songs to return
* @return set of songs by the given artist
*/
SimpleSet<Song> songsHavingArtist(String artist);
/**
* Return the songs on the given album.
*
* @param album
* album of songs to return
* @return set of songs on the given album
*/
SimpleSet<Song> songsHavingAlbum(String album);
/**
* Return all songs in this library.
*
* @return set of songs in this library
*/
SimpleSet<Song> allSongs();
/**
* Return all distinct genres of all songs in this library.
*
* @return set of genres of songs in this library
*/
SimpleSet<String> allGenres();
/**
* Return all distinct artists of all songs in this library.
*
* @return set of artists of songs in this library
*/
SimpleSet<String> allArtists();
/**
* Return all distinct albums of all songs in this library.
*
* @return set of albums of songs in this library
*/
SimpleSet<String> allAlbums();
}