private Integer parseIntegerFromParam ( final String value , final int defaultValue ) { try { return Integer . valueOf ( value ) ; } catch ( NumberFormatException | NullPointerException e ) { return defaultValue ; } }
Parses a parameter to an Integer defaulting to 0 upon any errors encountered .