private Set<Integer> findGivenValueInRow(int value, int startPoint, int numberOfFinds) {
    Set<Integer> valueLocations = new HashSet<Integer>();

    int foundNumber = 0;

    int element = (this.getSize() * this.getSize());

    if (startPoint < element) {
      //startPoint--;
    } else {
      startPoint--;
    }

    int stopLocation = (startPoint / this.getSize()) * this.getSize() + (this.getSize() - 1);
    boolean stopSearching = false;

    Set<Integer> currentSet = new HashSet<Integer>();

    for (int i = (startPoint); i <= stopLocation && !stopSearching; i++) {

      if (getElementWithNumber(i) == EMPTY_ELEMENT_VALUE) {
        currentSet.addAll(this.validElementsCache.get(i));
        for (int valueTest : currentSet) {
          if (value == valueTest && foundNumber < numberOfFinds) {
            valueLocations.add(i);
            if (numberOfFinds != 0) {
              foundNumber++;
            }
          } else if (value == valueTest) {
            //reseting valueLocation to -1 because it found more than one location with the value in the row.
            valueLocations.clear();
            stopSearching = true;
            break;
          }
        }
        currentSet.clear();
      }
    }
    return (valueLocations);
  }