@Test public void testParseStringAsInteger() throws Exception { System.out.println("parseStringAsInt"); String in = "0"; int expResult = 0; int result = ParseUtils.parseStringAsInt(in); assertEquals(expResult, result); in = "1"; expResult = 1; result = ParseUtils.parseStringAsInt(in); assertEquals(expResult, result, 0.0); in = "-1"; expResult = -1; result = ParseUtils.parseStringAsInt(in); assertEquals(expResult, result, 0.0); boolean expectExceptionThrown = false; try { ParseUtils.parseStringAsInt("dafhfda"); } catch (IndexParseFieldException e) { expectExceptionThrown = true; assertNotNull(e.getCause()); assertNotNull(e.getMessage()); } assertTrue(expectExceptionThrown); }
public static int parseStringAsInt(String in) throws IndexParseFieldException { try { return Integer.parseInt(in); } catch (NumberFormatException e) { throw new IndexParseFieldException(in, e); } }
ParseUtils { public static int parseStringAsInt(String in) throws IndexParseFieldException { try { return Integer.parseInt(in); } catch (NumberFormatException e) { throw new IndexParseFieldException(in, e); } } }
ParseUtils { public static int parseStringAsInt(String in) throws IndexParseFieldException { try { return Integer.parseInt(in); } catch (NumberFormatException e) { throw new IndexParseFieldException(in, e); } }  }
ParseUtils { public static int parseStringAsInt(String in) throws IndexParseFieldException { try { return Integer.parseInt(in); } catch (NumberFormatException e) { throw new IndexParseFieldException(in, e); } }  static ByteBuffer parseBase64StringAsByteBuffer(String in); static boolean parseStringAsBoolean(String in); static Date parseStringAsDate(String in); static double parseStringAsDouble(String in); static int parseStringAsInt(String in); static UUID parseStringAsUUID(String in); static Long parseStringAsLong(String in); }
ParseUtils { public static int parseStringAsInt(String in) throws IndexParseFieldException { try { return Integer.parseInt(in); } catch (NumberFormatException e) { throw new IndexParseFieldException(in, e); } }  static ByteBuffer parseBase64StringAsByteBuffer(String in); static boolean parseStringAsBoolean(String in); static Date parseStringAsDate(String in); static double parseStringAsDouble(String in); static int parseStringAsInt(String in); static UUID parseStringAsUUID(String in); static Long parseStringAsLong(String in);  }