package com.metaweb.gridlock.model; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Properties; import org.json.JSONException; import org.json.JSONObject; public class Row implements Serializable { private static final long serialVersionUID = -689264211730915507L; public boolean flagged; public boolean starred; public List cells; public Row(int cellCount) { cells = new ArrayList(cellCount); } public JSONObject getJSON(Properties options) throws JSONException { JSONObject o = new JSONObject(); List a = new ArrayList(cells.size()); for (Cell cell : cells) { a.add(cell.getJSON(options)); } o.put("cells", a); o.put("flagged", flagged); o.put("starred", starred); return o; } }