public static int getInteger ( String pStr , int defval ) { if ( isEmpty ( pStr ) ) return defval ; try { return Integer . parseInt ( pStr ) ; } catch ( NumberFormatException nm ) { return defval ; } }
Returns the parsed integer value for the passed in String .