code: public static int[] parseIndexString(String value) {
          logger.entering(value);
  
          List<Integer> indexes = new ArrayList<>();
          int begin;
          int end;
          String[] parsed;
          String[] parsedIndex = value.split(",");
          for (String index : parsedIndex) {
              if (index.contains("-")) {
                  parsed = index.split("-");
                  begin = Integer.parseInt(parsed[0].trim());
                  end = Integer.parseInt(parsed[1].trim());
                  for (int i = begin; i <= end; i++) {
                      indexes.add(i);
                  }
              } else {
                  try {
                      indexes.add(Integer.parseInt(index.trim()));
                  } catch (NumberFormatException e) {
                      String msg = new StringBuilder("Index '").append(index)
                              .append("' is invalid. Please provide either individual numbers or ranges.")
                              .append("\n Range needs to be de-marked by '-'").toString();
                      throw new DataProviderException(msg, e);
                  }
              }
          }
  
          int[] indexArray = Ints.toArray(indexes);
          logger.exiting(indexArray);
          return indexArray;
      }
docs: This function will parse the index string into separated individual indexes as needed. Calling the method with a
  string containing "1, 3, 5-7, 11, 12-14, 8" would return an list of integers {1, 3, 5, 6, 7, 11, 12, 13, 14, 8}.
  Use ',' to separate values, and use '-' to specify a continuous range. Presence of an invalid character would
  result in {@link DataProviderException}.
  
  @param value
  the input string represent the indexes to be parse.
  @return a list of indexes as an integer array