code: private boolean canRemove(SubsetSolution solution, Set<Integer> deleteCandidates){
          return !deleteCandidates.isEmpty()
                      && isValidSubsetSize(solution.getNumSelectedIDs()-1);
      }
docs: Check if it is allowed to remove one more item from the selection.
  
  @param solution solution for which moves are generated
  @param deleteCandidates set of candidate IDs to be deleted
  @return <code>true</code> if it is allowed to remove an item from the selection