code: public List<T> apply(List<T> selectedCandidates, Random rng)
      {
          List<T> output = new ArrayList<T>(selectedCandidates.size());
          for (T candidate : selectedCandidates)
          {
              output.add(replacementProbability.nextValue().nextEvent(rng)
                         ? factory.generateRandomCandidate(rng)
                         : candidate);
          }
          return output;
      }
docs: Randomly replace zero or more of the selected candidates with new,
  independent individuals that are randomly created.
  @param selectedCandidates The selected candidates, some of these may be
  discarded and replaced with new individuals.
  @param rng A source of randomness.
  @return The remaining candidates after some (or none) have been replaced
  with new individuals.