Code example for Pattern

Methods: split

0
     * Unpack a string created by {@link #stringify}. 
     * 
     * @throws IllegalArgumentException if it's an invalid string. 
     */ 
    public static AccountWithDataSet unstringify(String s) {
        final String[] array = STRINGIFY_SEPARATOR_PAT.split(s, 3);
        if (array.length < 3) {
            throw new IllegalArgumentException("Invalid string " + s);
        } 
        return new AccountWithDataSet(array[0], array[1],
                TextUtils.isEmpty(array[2]) ? null : array[2]);
    } 
 
    /** 
     * Pack a list of {@link AccountWithDataSet} into a string. 
     */ 
    public static String stringifyList(List<AccountWithDataSet> accounts) {
        final StringBuilder sb = new StringBuilder();
 
        for (AccountWithDataSet account : accounts) {
Experience pair programming with AI  Get Codota for Java