package com.alexrnl.gameoflife.world;

import java.util.Objects;

/**
 * A single cell of the game of life.
 * @author barfety_a
 */
public class Cell {
	/** The state of the cell */
	private State	state;
	
	/**
	 * Default constructor.
	 */
	public Cell (State state) {
		super();
		this.state = Objects.requireNonNull(state);
	}
	
	/**
	 * Check if the cell is alive.
	 * @return <code>true</code> if the cell is alive.
	 */
	public boolean isAlive () {
		return State.ALIVE.equals(state);
	}
	
	/**
	 * Check if the cell is dead.
	 * @return <code>true</code> if the cell is dead.
	 */
	public boolean isDead () {
		return State.DEAD.equals(state);
	}
	
	/**
	 * Provoke the death of the cell.
	 */
	public void die () {
		state = State.DEAD;
	}
	
	/**
	 * Bring a cell to life.
	 */
	public void live () {
		state = State.ALIVE;
	}
}

@@ -244,16 +244,69 @@
 uctor.%0D%0A
+%09 * @param state%0D%0A%09 *        the state of the cell.%0D%0A
 %09 */%0D%0A%09p
@@ -317,16 +317,22 @@
 c Cell (
+final 
 State st

Format class Cell