public boolean addAllUnique(Collection<Playlist> ps){
  boolean didChange=false;
  for (  Playlist p : ps) {
    if (p != null && !mPlaylists.contains(p)) {
      mPlaylists.add(p);
      didChange=true;
    }
  }
  if (didChange) {
    notifyDataSetChanged();
  }
  return didChange;
}

public boolean addAllUnique ( Collection < Playlist > ps ) { boolean didChange = false ; for ( Playlist p : ps ) { if ( p != null && ! mPlaylists . contains ( p ) ) { mPlaylists . add ( p ) ; didChange = true ; } } if ( didChange ) { notifyDataSetChanged ( ) ; } return didChange ; }
add all the elements into the adapter if they ' re not already there
