Package modelarium.entities.contexts
Interface EnvironmentContext
- All Superinterfaces:
Context,EntityContext
- All Known Implementing Classes:
EnvironmentSimulationContext
public sealed interface EnvironmentContext
extends EntityContext
permits EnvironmentSimulationContext
Interface for providing the environment's attributes with access to their owning environment and the wider model.
This interface is the view of the simulation the environment's attributes are given, exposing the environment itself along with the attribute set and attribute currently being run.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the attribute currently being run on the owning environment.Returns the attribute set currently being run on the owning environment.Returns the environment this context belongs to.Methods inherited from interface modelarium.entities.contexts.Context
doesAgentExistInThisCore, getAgent, getClock, getCurrentPopulationSize, getFilteredAgents, getFilteredAgents, getRandom, killAgent, killAgent, killAgents, killAgentsMethods inherited from interface modelarium.entities.contexts.EntityContext
addAgent, addAgents, addAgents
-
Method Details
-
getThisEntity
Environment getThisEntity()Returns the environment this context belongs to.- Returns:
- the owning
Environmentinstance
-
getThisAttributeSet
EnvironmentAttributeSet getThisAttributeSet()Returns the attribute set currently being run on the owning environment.- Returns:
- the current
EnvironmentAttributeSetinstance
-
getThisAttribute
AttributeBase<EnvironmentSimulationContext> getThisAttribute()Returns the attribute currently being run on the owning environment.- Returns:
- the current attribute instance
-