@Test public void testGetInteger() throws SoarException { op.newOption(alpha).requiredArg().done(); op.process(Lists.newArrayList("command", "--alpha", "1")); assertTrue(op.has(alpha)); assertEquals(1, op.getInteger(alpha)); }
public int getInteger(E longOption) throws SoarException { String arg = get(longOption); try { return Integer.parseInt(arg); } catch (NumberFormatException e) { throw new SoarException("Invalid integer value: " + arg); } }
OptionProcessor { public int getInteger(E longOption) throws SoarException { String arg = get(longOption); try { return Integer.parseInt(arg); } catch (NumberFormatException e) { throw new SoarException("Invalid integer value: " + arg); } } }
OptionProcessor { public int getInteger(E longOption) throws SoarException { String arg = get(longOption); try { return Integer.parseInt(arg); } catch (NumberFormatException e) { throw new SoarException("Invalid integer value: " + arg); } }  }
OptionProcessor { public int getInteger(E longOption) throws SoarException { String arg = get(longOption); try { return Integer.parseInt(arg); } catch (NumberFormatException e) { throw new SoarException("Invalid integer value: " + arg); } }  static OptionProcessor<T> create(); OptionBuilder newOption(E longOption); List<String> process(List<String> args); boolean has(E longOption); void set(E longOption); void unset(E longOption); void set(E longOption, String argument); String get(E longOption); int getInteger(E longOption); double getDouble(E longOption); float getFloat(E longOption); @Override String toString(); }
OptionProcessor { public int getInteger(E longOption) throws SoarException { String arg = get(longOption); try { return Integer.parseInt(arg); } catch (NumberFormatException e) { throw new SoarException("Invalid integer value: " + arg); } }  static OptionProcessor<T> create(); OptionBuilder newOption(E longOption); List<String> process(List<String> args); boolean has(E longOption); void set(E longOption); void unset(E longOption); void set(E longOption, String argument); String get(E longOption); int getInteger(E longOption); double getDouble(E longOption); float getFloat(E longOption); @Override String toString();  }