Class EnvironmentAttributeSet
java.lang.Object
modelarium.entities.attributes.sets.AttributeSet<EnvironmentSimulationContext,EnvironmentContext>
modelarium.entities.attributes.sets.EnvironmentAttributeSet
public final class EnvironmentAttributeSet
extends AttributeSet<EnvironmentSimulationContext,EnvironmentContext>
Class for containing and managing a named group of an environment's attributes.
This class specialises AttributeSet so that retrieved attributes are returned as their
environment-flavoured types.
-
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentAttributeSet(String name, List<Attribute> attributes) Constructs a new environment attribute set with the specified owner, name and attributes. -
Method Summary
Modifier and TypeMethodDescriptionget(int index) Retrieves a publicly accessible attribute by index.Retrieves a publicly accessible attribute by name.getEvent(int eventIndex) Retrieves an event by its index among this set's events.Retrieves an event by name.getProperty(int propertyIndex) Retrieves a property by its index among this set's properties.getProperty(String propertyName) Retrieves a property by name.getRoutine(int routineIndex) Retrieves a routine by its index among this set's routines.getRoutine(String routineName) Retrieves a routine by name.Methods inherited from class modelarium.entities.attributes.sets.AttributeSet
getLog, name, run, size
-
Constructor Details
-
EnvironmentAttributeSet
Constructs a new environment attribute set with the specified owner, name and attributes.- Parameters:
name- the name of the attribute set, used to identify it within its owning environmentattributes- the attributes the set will contain, in the order they will be run
-
-
Method Details
-
get
Retrieves a publicly accessible attribute by index.- Overrides:
getin classAttributeSet<EnvironmentSimulationContext,EnvironmentContext> - Parameters:
index- the index of the attribute to retrieve- Returns:
- the
EnvironmentAttributeat the specified index
-
get
Retrieves a publicly accessible attribute by name.- Overrides:
getin classAttributeSet<EnvironmentSimulationContext,EnvironmentContext> - Parameters:
attributeName- the name of the attribute to retrieve- Returns:
- the
EnvironmentAttributewith the specified name
-
getEvent
Retrieves an event by its index among this set's events.- Overrides:
getEventin classAttributeSet<EnvironmentSimulationContext,EnvironmentContext> - Parameters:
eventIndex- the index of the event to retrieve- Returns:
- the
EnvironmentEventat the specified index
-
getEvent
Retrieves an event by name.- Overrides:
getEventin classAttributeSet<EnvironmentSimulationContext,EnvironmentContext> - Parameters:
eventName- the name of the event to retrieve- Returns:
- the
EnvironmentEventwith the specified name
-
getRoutine
Retrieves a routine by its index among this set's routines.- Overrides:
getRoutinein classAttributeSet<EnvironmentSimulationContext,EnvironmentContext> - Parameters:
routineIndex- the index of the routine to retrieve- Returns:
- the
EnvironmentRoutineat the specified index
-
getRoutine
Retrieves a routine by name.- Overrides:
getRoutinein classAttributeSet<EnvironmentSimulationContext,EnvironmentContext> - Parameters:
routineName- the name of the routine to retrieve- Returns:
- the
EnvironmentRoutinewith the specified name
-
getProperty
Retrieves a property by its index among this set's properties.- Overrides:
getPropertyin classAttributeSet<EnvironmentSimulationContext,EnvironmentContext> - Parameters:
propertyIndex- the index of the property to retrieve- Returns:
- the
EnvironmentPropertyat the specified index
-
getProperty
Retrieves a property by name.- Overrides:
getPropertyin classAttributeSet<EnvironmentSimulationContext,EnvironmentContext> - Parameters:
propertyName- the name of the property to retrieve- Returns:
- the
EnvironmentPropertywith the specified name
-