private boolean isValidPlaylistName(String newName){
  Playlist blankPlaylist=new Playlist(newName,false);
  return !newName.isEmpty() && !musicLibrary.containsPlaylist(blankPlaylist);
}

private boolean isValidPlaylistName ( String newName ) { Playlist blankPlaylist = new Playlist ( newName , false ) ; return ! newName . isEmpty ( ) && ! musicLibrary . containsPlaylist ( blankPlaylist ) ; }
ensures that a string for a playlist is valid , checking if it is empty , or another playlist has the same name .
