code: static Integer integer(String value) {
          Integer result;
          if (value != null) {
              value = value.trim();
              Matcher matcher = INTEGER_PATTERN.matcher(value);
              if (matcher.matches()) {
                  result = Integer.parseInt(matcher.group(1).replace(" ", ""));
              } else {
                  throw new IllegalArgumentException("Unknown format for value: " + value);
              }
          } else {
              result = null;
          }
          return result;
      }
docs: Convert a string to an integer.
  
  @param value value to convert
  @return converted value, or <code>null</code> if the supplied value was <code>null</code>
  @throws IllegalArgumentException if the supplied value could not be parsed