public Playlist update ( TrackInfo old , TrackInfo newTrackInfo ) { List < TrackInfo > list = new ArrayList <> ( queue ) ; list . set ( list . indexOf ( old ) , newTrackInfo ) ; return new Playlist ( queue , name , playbackModes , position ) ; }
updates the TrackInfo - Object