code: public int findPosition(S indiv) {
  
      for (int i = 0; i < populationSize; i++) {
        if (indiv.equals(population.get(i))) {
          return i;
        }
      }
  
      return -1;
    }
docs: find the index of the solution 'indiv' in the population