out.addProperties(universe.getProperties());
out.addSubSection("UNIVERSE-PARAM");
out.writeProperty(PersistConst.ROWS, universe.getRows());
out.writeProperty(PersistConst.COLS, universe.getColumns());
out.addSubSection("UNIVERSE-CELLS");
UniverseCellFactory factory = universe.getCellFactory();
String className = factory.getClass().getSimpleName();
out.writeProperty(PersistConst.TYPE, className);
if( factory instanceof BasicCellFactory ) {
BasicCellFactory factory2 = (BasicCellFactory)factory;
out.writeProperty(BasicUniverse.ELEMENT_COUNT, factory2.getElementCount());
out.writeProperty(PersistConst.MAX, factory2.getMax());