public int getFirstResultAsInt(final Argument arg, final int undefinedValue) {
    final String value = getFirstResult(arg);
    if (value == null) {
      return undefinedValue;
    } else {
      return Integer.parseInt(value);
    }
  }
Convenience method to return the result of getFirstResult method as an integer.

@param arg argument to query
@param undefinedValue value to return when argument is not defined or is illegally defined
@return value specified, or default value provided
extensions/geode-modules-session/src/main/java/org/apache/geode/modules/session/installer/args/ArgumentValues.java