|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.state.StateSink
@ConfigurableType(value="State") public class StateSink
Processes SimulatorState objects
| Field Summary | |
|---|---|
StateFilterManager |
filterManager
Manages the state filters |
StateProcessorManager |
processorManager
Manages the state processors |
| Constructor Summary | |
|---|---|
StateSink(StateSource source)
Builds a new StateSink |
|
| Method Summary | |
|---|---|
void |
addStateListener(StateListener listener)
Registers a listeners interest in this state. |
int |
findID(int id)
Searches the state and returns the index of the speck with the supplied id. |
Configurator |
getConfigurator()
Gets a Configurator object that describes and can manipulate the variables of this Configurable. |
long |
getPopulationStamp()
Gets the current value of the population stamp. |
StateProcessor |
getProcessor(java.lang.String name)
Gets a named StateProcessor, so that the output can be accessed |
SimulatorState |
getState()
Gets the current state object |
StateFilter |
getStateFilter(java.lang.String name)
Retrieves a filter based on its name |
boolean |
isIncluded(int index)
Determines whether or not a given element should be included in any state processing, statistics gathering, visualisation and so on |
void |
refresh()
Causes the state to be updated from the current StateSource, and the listeners to be notified |
void |
removeStateListener(StateListener listener)
Registers a listener's boredom in this state. |
void |
setSource(StateSource source)
Sets the source of SimulatorState objects |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@SubConfigurable public StateFilterManager filterManager
@SubConfigurable public StateProcessorManager processorManager
| Constructor Detail |
|---|
public StateSink(StateSource source)
StateSink
source - The source to use| Method Detail |
|---|
public void refresh()
StateSource, and the listeners to be notified
public void setSource(StateSource source)
SimulatorState objects
source - The new sourcepublic long getPopulationStamp()
public void addStateListener(StateListener listener)
listener - The listener to registerpublic void removeStateListener(StateListener listener)
listener - The listener to removepublic StateProcessor getProcessor(java.lang.String name)
name - The name of the desired processor
public int findID(int id)
id - The speck id to search for
public boolean isIncluded(int index)
index - the index of the element to consider
true if the element is to be included,
false otherwisepublic StateFilter getStateFilter(java.lang.String name)
name - The name of the desired filter
public SimulatorState getState()
SimulatorState objectpublic Configurator getConfigurator()
Configurable
getConfigurator in interface Configurable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||