001package csheets.ext.share.core;
002
003import java.io.Serializable;
004
005/**
006 * The object that will be passed throw network (content of the cell, row,
007 * column and if is a cell)
008 * 
009 * @author Andre
010 * 
011 */
012public class CellNetwork implements Serializable {
013
014        /** genreated id */
015        private static final long serialVersionUID = 1L;
016        /** content of the cell */
017        private final String content;
018        /** row of the original cell */
019        private final int row;
020        /** column of the original cell */
021        private final int column;
022        /** true if is a cell */
023        private final boolean isCell;
024
025        /**
026         * Create a new object to be passed throw network
027         * 
028         * @param content
029         *            content of the cell
030         * @param row
031         *            row of the original cell
032         * @param column
033         *            column of the original cell
034         * @param isCell
035         *            true if is a cell
036         */
037        public CellNetwork(String content, int row, int column, boolean isCell) {
038                this.content = content;
039                this.row = row;
040                this.column = column;
041                this.isCell = isCell;
042        }
043
044        /**
045         * Method that will say if the passed object was a cell
046         * 
047         * @return true if is a cell
048         */
049        public boolean isCell() {
050                return isCell;
051        }
052
053        /**
054         * Method that returns the content of the original cell
055         * 
056         * @return the content of the original cell
057         */
058        public String getContent() {
059                return content;
060        }
061
062        /**
063         * Method that returns the row of the original cell
064         * 
065         * @return the row of the original cell
066         */
067        public int getRow() {
068                return row;
069        }
070
071        /**
072         * Method that returns the column of the original cell
073         * 
074         * @return the column of the original cell
075         */
076        public int getColumn() {
077                return column;
078        }
079
080}