code: private int numSwaps(Set<Integer> addCandidates, Set<Integer> deleteCandidates){
          return Math.min(addCandidates.size(), Math.min(deleteCandidates.size(), numSwaps));
      }
docs: Infer the number of swaps that will be performed, taking into account the fixed number of desired
  swaps as specified at construction and the maximum number of possible swaps for the given subset solution.
  
  @param addCandidates candidate IDs to be added to the selection
  @param deleteCandidates candidate IDs to be removed from the selection
  @return number of swaps to be performed: desired fixed number if possible, or less (as many as possible)