@Override public void toggleSelection(T photo){
  if (selectedPhotos.contains(photo)) {
    selectedPhotos.remove(photo);
  }
 else {
    selectedPhotos.add(photo);
  }
}

@ Override public void toggleSelection ( T photo ) { if ( selectedPhotos . contains ( photo ) ) { selectedPhotos . remove ( photo ) ; } else { selectedPhotos . add ( photo ) ; } }
toggle the selection status of the item at a given position
