org.univ.paris5.GameOfLife
Class States

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

public class States
extends java.lang.Object

Every Algoritm have a states, it is this objet. It is a Collection of the objet State.


Constructor Summary
States()
          Instance of the States.
States(int number_State, java.awt.Color[] state_colors)
          Instance of the States, this instance set the valeu of the state.
 
Method Summary
 State getDefaultState()
          The method get default state, i s so 1re index state.
 State getNextState(State state)
          Get next state.
 int getNumberState()
          The method get the size of the states.
 State getStateByIndex(java.lang.String index)
          get the State with index.
 void initState(int number)
          The method of init the state map.
 void setState(State state)
          Modified or Add a new state.
 void setState(java.lang.String index, State state)
          Modified or Add a new state.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

States

public States()
Instance of the States.


States

public States(int number_State,
              java.awt.Color[] state_colors)
Instance of the States, this instance set the valeu of the state.

Parameters:
amount_State -
Method Detail

initState

public void initState(int number)
The method of init the state map.

Parameters:
amount -

getDefaultState

public State getDefaultState()
The method get default state, i s so 1re index state.

Returns:
state

getStateByIndex

public State getStateByIndex(java.lang.String index)
get the State with index.

Parameters:
index -
Returns:
state

setState

public void setState(java.lang.String index,
                     State state)
Modified or Add a new state.

Parameters:
index -
state -

setState

public void setState(State state)
Modified or Add a new state.

Parameters:
state -

getNumberState

public int getNumberState()
The method get the size of the states.

Returns:
number

getNextState

public State getNextState(State state)
Get next state.

Returns:
state