Package org.plugtree.training.model

Examples of org.plugtree.training.model.Playlist


    private List<Playlist> createPlaylists() {

        List<Playlist> playlists = new ArrayList<Playlist>();

        //playlist A
        Playlist playlistA = new Playlist();
        playlistA.setName("A playlist");
        playlistA.addSong(this.createTheFinalCountdownSong());
        playlistA.addSong(this.createAdagioSong());
        playlists.add(playlistA);

        //playlist B (the titles of its songs don't contain the 'a' letter
        Playlist playlistB = new Playlist();
        playlistB.setName("B playlist");
        playlistB.addSong(this.createThrillerSong());
        playlistB.addSong(this.createNoForTheInocentSong());
        playlists.add(playlistB);

        return playlists;
    }
View Full Code Here


    /**
     * Creates a new playlist with 3 songs.
     * @return the created playlist
     */
    private Playlist createLongPlaylist() {
        Playlist playlist = new Playlist();
        playlist.setName("My favorite songs");


        Song song = new Song("Thriller", Song.Genre.POP, 6540, 1982);
        song.addArtist(new Artist("Michael", "Jackson"));
        playlist.addSong(song);

        song = new Song("Adagio", Song.Genre.CLASSICAL, 2561, 1708);
        song.addArtist(new Artist("Johann Sebastian", "Bach"));
        playlist.addSong(song);

        song = new Song("The final countdown", Song.Genre.ROCK, 300, 1985);
        song.addArtist(new Artist("Joey", "Tempest"));
        song.addArtist(new Artist("John", "Norum"));
        playlist.addSong(song);



        return playlist;
    }
View Full Code Here

        return playlist;
    }

    private Playlist createShortPlaylist() {
        Playlist playlist = new Playlist();
        playlist.setName("Rock songs");

        Song song = new Song("The final countdown", Song.Genre.ROCK, 300, 1985);
        song.addArtist(new Artist("Joey", "Tempest"));
        song.addArtist(new Artist("John", "Norum"));
        playlist.addSong(song);

        return playlist;
    }
View Full Code Here

TOP

Related Classes of org.plugtree.training.model.Playlist

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.