%% convert_hierarchical_grid_to_java
% generates a java version fo the hiearchcial grid
%
% inputs:
%   grid:Grid - grid to convert
%   java_grid:TwoDimensionalGrid - place to put changed cells.
%
% outputs;
%   none
% Author: Matthew Dawson matthew@mjdsystems.ca
% Author: Yanjun Jiang   jiangy76@mcmaster.ca
% Organization: McMaster Centre for Software Certification

function convert_twodimensional_grid_to_java(grid, java_grid)

% Pre-set the x size.
java_grid.resize(size(grid.Grid1.cells, 2), 1)

TableBlock.convert_twodimensional_grid_to_java_real(grid, grid.Grid2.cells, grid.Grid1.cells, java_grid, 0);

end

