/**
   * Returns the valid values in rows <codE>begin</code> through <codE>end</code>
   *
   * @param begin row number from to begin retrieving of values
   * @param end last row number in the section from which values are retrieved.
   * @return only valid values from rows no. <code>begin</code> through <codE>end</code>, sorted.
   */
  protected Object[] getValuesInRange(int begin, int end) {

    if (end < begin) {
      Object[] retVal = {};
      return retVal;
    }

    int[] indices = VHashService.getIndicesInRange(begin, end, elements);
    Object[] values = new Object[indices.length];
    for (int i = 0; i < indices.length; i++) {
      values[i] = elements.get(indices[i]);
    }
    toComparableArray(values);

    Arrays.sort(values);
    return values;
  }