public class Build_Cells extends Loop {
private List<List<Cell>> map = new ArrayList<List<Cell>>();
public Build_Cells(){
}
public Build_Cells( int height, int width , int cell_size ){
int col = height / cell_size;
int rows = width / cell_size;
for( int y = 0; y < col ; y++){
map.add(y, new ArrayList<Cell>(rows));
}
}
};
コードの最後の行: map.add(y, new ArrayList(rows)); ArrayList (行) 内のすべての要素に対して Cell のコンストラクター Cell() を実行したいのですが、どうすればよいですか?