public String patternToString() {
        if (mPattern == null) {
            return "";
        }
        final int patternSize = mPattern.size();
        final StringBuilder res = new StringBuilder(patternSize);
        for (int i = 0; i < patternSize; i++) {
            final String cellToString = mPattern.get(i).getId();
            res.append(cellToString);
            if (i != patternSize - 1) {
                res.append("&");
            }
        }
        return res.toString();
    }
@return a String that represents the current pattern. Never null
android-patternview/src/main/java/com/eftimoff/patternview/PatternView.java