code: @Override
      protected List<String> mate(String parent1,
                                  String parent2,
                                  int numberOfCrossoverPoints,
                                  Random rng)
      {
          if (parent1.length() != parent2.length())
          {
              throw new IllegalArgumentException("Cannot perform cross-over with different length parents.");
          }
          StringBuilder offspring1 = new StringBuilder(parent1);
          StringBuilder offspring2 = new StringBuilder(parent2);
          // Apply as many cross-overs as required.
          for (int i = 0; i < numberOfCrossoverPoints; i++)
          {
              // Cross-over index is always greater than zero and less than
              // the length of the parent so that we always pick a point that
              // will result in a meaningful cross-over.
              int crossoverIndex = (1 + rng.nextInt(parent1.length() - 1));
              for (int j = 0; j < crossoverIndex; j++)
              {
                  char temp = offspring1.charAt(j);
                  offspring1.setCharAt(j, offspring2.charAt(j));
                  offspring2.setCharAt(j, temp);
              }
          }
          List<String> result = new ArrayList<String>(2);
          result.add(offspring1.toString());
          result.add(offspring2.toString());
          return result;
      }
docs: {@inheritDoc}