public abstract class Law extends java.lang.Object implements LifeCycle
| Modifier and Type | Field and Description |
|---|---|
protected Parameters |
parameters
The parameters.
|
protected java.lang.String |
type
The type.
|
protected World |
world
The world.
|
| Constructor and Description |
|---|
Law() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
changeState(LawState oldState,
double instant,
LawState newState)
Change state.
|
Parameters |
getParameters()
Returns all configured parameters.
|
java.lang.String |
getType()
Gets the type.
|
World |
getWorld()
Gets the world.
|
boolean |
parameterUpdate(java.lang.String name,
java.lang.String newValue)
User-implement method called when a parameter has been updated.
|
void |
setParameters(Parameters parameters)
Framework-implemented method that sets system and user parameters.
|
void |
setType(java.lang.String type)
Sets the type.
|
void |
setWorld(World world)
Sets the world.
|
boolean |
start()
Framework-implemented initialization method.
|
boolean |
stop()
Framework-implemented finalization method.
|
protected World world
protected java.lang.String type
protected Parameters parameters
public void setWorld(World world)
world - the new worldpublic World getWorld()
public void setType(java.lang.String type)
type - the new typepublic java.lang.String getType()
public void setParameters(Parameters parameters)
LifeCyclesetParameters in interface LifeCycleparameters - a Parameters object with all user and system Parameters for this objectpublic Parameters getParameters()
LifeCyclegetParameters in interface LifeCyclepublic boolean start()
LifeCyclepublic boolean stop()
LifeCyclepublic boolean parameterUpdate(java.lang.String name,
java.lang.String newValue)
LifeCycleparameterUpdate in interface LifeCyclename - the namenewValue - the new value