public abstract class CompositeScoreFunction extends AbstractScoreFunction
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<ScoreFunction> |
children
The child score functions.
|
| Constructor and Description |
|---|
CompositeScoreFunction(java.lang.String name)
Create a CompositeScoreFunction with no children.
|
CompositeScoreFunction(java.lang.String name,
java.util.Collection<ScoreFunction> c)
Create a CompositeScoreFunction with a collection of children.
|
CompositeScoreFunction(java.lang.String name,
ScoreFunction... c)
Create a CompositeScoreFunction with a collection of children.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildFunction(ScoreFunction child)
Add a child score function.
|
void |
addChildFunctions(java.util.Collection<ScoreFunction> c)
Add a collection of child score functions.
|
void |
addChildFunctions(ScoreFunction... c)
Add a collection of child score functions.
|
java.util.Set<ScoreFunction> |
getChildFunctions()
Get all the child functions.
|
void |
initialise(WorldModel<? extends Entity> world,
Config config)
Initialise this score function.
|
void |
removeChildFunction(ScoreFunction child)
Remove a child score function.
|
void |
removeChildFunctions(java.util.Collection<ScoreFunction> c)
Remove a collection of child score functions.
|
void |
removeChildFunctions(ScoreFunction... c)
Remove a collection of child score functions.
|
getName, setName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitscoreprotected java.util.Set<ScoreFunction> children
public CompositeScoreFunction(java.lang.String name)
name - The name of this function.public CompositeScoreFunction(java.lang.String name,
java.util.Collection<ScoreFunction> c)
name - The name of this function.c - The child score functions.public CompositeScoreFunction(java.lang.String name,
ScoreFunction... c)
name - The name of this function.c - The child score functions.public void addChildFunction(ScoreFunction child)
child - The child function to add.public final void addChildFunctions(java.util.Collection<ScoreFunction> c)
c - The child functions to add.public final void addChildFunctions(ScoreFunction... c)
c - The child functions to add.public void removeChildFunction(ScoreFunction child)
child - The child function to remove.public final void removeChildFunctions(java.util.Collection<ScoreFunction> c)
c - The child functions to remove.public final void removeChildFunctions(ScoreFunction... c)
c - The child functions to remove.public void initialise(WorldModel<? extends Entity> world, Config config)
ScoreFunctioninitialise in interface ScoreFunctioninitialise in class AbstractScoreFunctionworld - The state of the world at the start of the simulation.config - The system configuration.public java.util.Set<ScoreFunction> getChildFunctions()