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;
}

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
