public Integer [ ] getParaValuesToInt ( String name ) { String [ ] values = request . getParameterValues ( name ) ; if ( values == null || values . length == 0 ) { return null ; } Integer [ ] result = new Integer [ values . length ] ; for ( int i = 0 ; i < result . length ; i ++ ) { result [ i ] = StrKit . isBlank ( values [ i ] ) ? null : Integer . parseInt ( values [ i ] ) ; } return result ; }
Returns an array of Integer objects containing all of the values the given request parameter has or null if the parameter does not exist . If the parameter has a single value the array has a length of 1 .