code: public static int[] parseIntRange(final String aIntRange) {
          final String[] range = aIntRange.split(RANGE_DELIMETER);
          final int[] ints;
  
          if (range.length == 1) {
              ints = new int[range.length];
              ints[0] = Integer.parseInt(aIntRange);
          } else {
              final int start = Integer.parseInt(range[0]);
              final int end = Integer.parseInt(range[1]);
  
              if (end >= start) {
                  int position = 0;
                  final int size = end - start;
                  ints = new int[size + 1]; // because we're zero-based
  
                  for (int index = start; index <= end; index++) {
                      ints[position++] = index;
                  }
              } else {
                  throw new NumberFormatException(LOGGER.getI18n(MessageCodes.UTIL_045, start, RANGE_DELIMETER, end));
              }
          }
  
          return ints;
      }
docs: Parses strings with an integer range (e.g., 2-5) and returns an expanded integer array {2, 3, 4, 5} with those
  values.
  
  @param aIntRange A string representation of a range of integers
  @return An int array with the expanded values of the string representation