code: public static <S> boolean solutionListsAreEquals(List<S> solutionList,
                                                     List<S> newSolutionList) {
      boolean found;
      for (int i = 0; i < solutionList.size(); i++) {
  
        int j = 0;
        found = false;
        while (j < newSolutionList.size()) {
          if (solutionList.get(i).equals(newSolutionList.get(j))) {
            found = true;
          }
          j++;
        }
        if (!found) {
          return false;
        }
      }
      return true;
    }
docs: Compares two solution lists to determine if both are equals
  
  @param solutionList    A <code>Solution list</code>
  @param newSolutionList A <code>Solution list</code>
  @return true if both are contains the same solutions, false in other case