public final class SpeciesAgentManager<E>
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static interface |
SpeciesAgentManager.AgentSource<E> |
Interface for an object that wants an agent associated with each
AtomType in a Simulation.
|
Constructor | Description |
---|---|
SpeciesAgentManager(SpeciesAgentManager.AgentSource<E> source,
Simulation sim) |
Modifier and Type | Method | Description |
---|---|---|
void |
dispose() |
Unregisters this class as a listener for AtomType-related events and
releases its agents.
|
E |
getAgent(ISpecies species) |
Convenience method to return the agent the given AtomType.
|
IndexMap<E> |
getAgents() |
|
void |
setAgent(ISpecies species,
E newAgent) |
Sets the agent associated with the given atom type to be the given
agent.
|
public SpeciesAgentManager(SpeciesAgentManager.AgentSource<E> source, Simulation sim)
public void setAgent(ISpecies species, E newAgent)
public E getAgent(ISpecies species)
public void dispose()