public void insert(int row, int column, int value) { RowHeadNode rowHead = (RowHeadNode)getRow(row); ColumnHeadNode columnHead = (ColumnHeadNode)getColumn(column); ValueNode myValueNode = new ValueNode(row, column, value); rowHead.insert(myValueNode); columnHead.insert(myValueNode); }
public HeadNode getRow(int position) { for (int i = 0; i <= position; i++) { if (i == position) { RowHeadNode result = new RowHeadNode(); return(result); } getNextInRow(); } return(null); }