@Nonnull
    public static List<String> splitToList(@Nonnull String source, @Nonnull String delimiters, boolean returnDelimiters, boolean trim) {
    """
	Split a string and return the values as an array.
	
	@param delimiters delimiters that are accepted by StringTokenizer
    """
        final List<String> values = new ArrayList<>();
        if (source != null) {
            final StringTokenizer st = new StringTokenizer(source, delimiters, returnDelimiters);
            while (st.hasMoreTokens()) {
                String value = st.nextToken();
                if (trim) {
                    value = trim(value);
                }
                values.add(value);
            }
        }
        return values;
    }
@Nonnull
    public static List<String> splitToList(@Nonnull String source, @Nonnull String delimiters, boolean returnDelimiters, boolean trim) {
        final List<String> values = new ArrayList<>();
        if (source != null) {
            final StringTokenizer st = new StringTokenizer(source, delimiters, returnDelimiters);
            while (st.hasMoreTokens()) {
                String value = st.nextToken();
                if (trim) {
                    value = trim(value);
                }
                values.add(value);
            }
        }
        return values;
    }
@ Nonnull public static List < String > splitToList ( @ Nonnull String source , @ Nonnull String delimiters , boolean returnDelimiters , boolean trim ) { final List < String > values = new ArrayList <> ( ) ; if ( source != null ) { final StringTokenizer st = new StringTokenizer ( source , delimiters , returnDelimiters ) ; while ( st . hasMoreTokens ( ) ) { String value = st . nextToken ( ) ; if ( trim ) { value = trim ( value ) ; } values . add ( value ) ; } } return values ; }
Split a string and return the values as an array.

@param delimiters delimiters that are accepted by StringTokenizer
Split a string and return the values as an array .