code: public void setPlaylist(PlayList playlist) {
          this.playlist = playlist;
          if (adapter != null) {
              playlist.onSlideCountChanged(adapter.getCount());
          }
      }
docs: Set the playlist
  
  @param playlist The playlist to set