indvdum@6: package ru.bosony.model.mine; indvdum@6: indvdum@6: import ru.bosony.model.cellscontents.CellContent; indvdum@22: import ru.bosony.model.moving.Coordinate; indvdum@6: indvdum@6: /** indvdum@6: * @author indvdum (gotoindvdum[at]gmail[dot]com)
indvdum@6: * 13.07.2012 22:10:18 indvdum@6: * indvdum@6: */ indvdum@22: public class Cell implements Cloneable { indvdum@6: indvdum@7: protected Coordinate coordinate; indvdum@6: protected CellContent content; indvdum@6: indvdum@7: public Cell(Coordinate coordinate, CellContent content) { indvdum@7: this.coordinate = coordinate; indvdum@6: this.content = content; indvdum@6: } indvdum@6: indvdum@6: public CellContent getContent() { indvdum@6: return content; indvdum@6: } indvdum@6: indvdum@6: public void setContent(CellContent content) { indvdum@6: this.content = content; indvdum@6: } indvdum@6: indvdum@7: public Coordinate getCoordinate() { indvdum@7: return coordinate; indvdum@6: } indvdum@6: indvdum@22: @Override indvdum@22: protected Cell clone() throws CloneNotSupportedException { indvdum@22: Cell clone = new Cell(coordinate, content); indvdum@22: return clone; indvdum@22: } indvdum@22: indvdum@50: @Override indvdum@50: public String toString() { indvdum@50: return "Cell [coordinate=" + coordinate + ", content=" + content + "]"; indvdum@50: } indvdum@50: indvdum@6: }