public static List<Cell> stringToPattern(final String string, final CellManager cellManager) {
        final List<Cell> result = new ArrayList<>();

        if(string.isEmpty()) {
            return result;
        }

        final String[] allCells = string.split("&");
        for (String allCell : allCells) {
            final String[] rowAndColumn = allCell.split("-");
            final int row = Integer.valueOf(rowAndColumn[0]);
            final int column = Integer.valueOf(rowAndColumn[1]);
            final Cell cell = cellManager.get(row, column);
            result.add(cell);
        }
        return result;
    }
Converts a string to a pattern

@param string
@return
android-patternview/src/main/java/com/eftimoff/patternview/utils/CellUtils.java