org.univ.paris5.GameOfLife
Class Util

java.lang.Object
  extended by org.univ.paris5.GameOfLife.Util

public class Util
extends java.lang.Object

The method tools for Game of life.


Constructor Summary
Util()
          Create a instance the Util.
 
Method Summary
static void addShapeToFile(Shape oneShape, org.w3c.dom.Node node, org.w3c.dom.Document doc)
          Save the Node.
static int getNombreNeighbor(int loop)
          Calcul the numbre neighbor with loop.
static java.util.Vector getShape(java.lang.String filePath)
          Get the shape from to a file xml.
static void saveShape(Shape shape, java.lang.String filePath)
          Save the shape to the file xml.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Create a instance the Util.

Method Detail

getNombreNeighbor

public static int getNombreNeighbor(int loop)
Calcul the numbre neighbor with loop.

Parameters:
loop -
Returns:

saveShape

public static void saveShape(Shape shape,
                             java.lang.String filePath)
                      throws java.lang.Exception
Save the shape to the file xml.

Parameters:
shape -
filePath -
Throws:
java.lang.Exception

addShapeToFile

public static void addShapeToFile(Shape oneShape,
                                  org.w3c.dom.Node node,
                                  org.w3c.dom.Document doc)
                           throws java.lang.Exception
Save the Node.

Parameters:
oneShape -
node -
doc -
Throws:
java.lang.Exception

getShape

public static java.util.Vector getShape(java.lang.String filePath)
                                 throws java.lang.Exception
Get the shape from to a file xml.

Parameters:
filePath -
Returns:
Throws:
java.lang.Exception