java/src/main/java/com/genexus/filters/ExpiresFilter.java
/**
     * Convert a comma delimited list of numbers into an <tt>int[]</tt>.
     * 
     * @param commaDelimitedInts
     *            can be <code>null</code>
     * @return never <code>null</code> array
     */
Convert a comma delimited list of numbers into an int[].

@param commaDelimitedInts
can be null
@return never null array
Convert a comma delimited list of numbers into an int [] . @param commaDelimitedInts can be null @return never null array
protected static int[] commaDelimitedListToIntArray(String commaDelimitedInts) {
        String[] intsAsStrings = commaDelimitedListToStringArray(commaDelimitedInts);
        int[] ints = new int[intsAsStrings.length];
        for (int i = 0; i < intsAsStrings.length; i++) {
            String intAsString = intsAsStrings[i];
            try {
                ints[i] = Integer.parseInt(intAsString);
            } catch (NumberFormatException e) {
                throw new RuntimeException("Exception parsing number '" + i + "' (zero based) of comma delimited list '"
                        + commaDelimitedInts + "'");
            }
        }
        return ints;
    }
protected static int [ ] commaDelimitedListToIntArray ( String commaDelimitedInts ) { String [ ] intsAsStrings = commaDelimitedListToStringArray ( commaDelimitedInts ) ; int [ ] ints = new int [ intsAsStrings . length ] ; for ( int i = 0 ; i < intsAsStrings . length ; i ++ ) { String intAsString = intsAsStrings [ i ] ; try { ints [ i ] = Integer . parseInt ( intAsString ) ; } catch ( NumberFormatException e ) { throw new RuntimeException ( "Exception parsing number '" + i + "' (zero based) of comma delimited list '" + commaDelimitedInts + "'" ) ; } } return ints ; }
Convert a comma delimited list of numbers into an <tt>int[]</tt>.
Convert a comma delimited list of numbers into an <tt > int [] < / tt > .