Class AgentProperty<T>
java.lang.Object
modelarium.entities.attributes.AttributeBase<AgentContext>
modelarium.entities.attributes.properties.Property<T,AgentContext>
modelarium.entities.attributes.properties.AgentProperty<T>
- Type Parameters:
T- the type of value this property carries
- All Implemented Interfaces:
AgentAttribute,Attribute
- Direct Known Subclasses:
FunctionalAgentProperty
public abstract non-sealed class AgentProperty<T>
extends Property<T,AgentContext>
implements AgentAttribute
Abstract class for representing a property belonging to an agent.
Subclasses define the behaviour, setter and getter of the property using an AgentContext.
-
Constructor Summary
ConstructorsConstructorDescriptionAgentProperty(String name, boolean isLogged, AttributeAccessLevel accessLevel, Class<T> type) Constructs a new agent property with the specified name, logging flag, access level and value type. -
Method Summary
Methods inherited from class modelarium.entities.attributes.properties.Property
get, get, getAsImmutable, run, run, set, set, toString, typeMethods inherited from class modelarium.entities.attributes.AttributeBase
accessLevel, context, isLogged, nameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface modelarium.entities.attributes.Attribute
accessLevel, getAsImmutable, isLogged, name, run
-
Constructor Details
-
AgentProperty
public AgentProperty(String name, boolean isLogged, AttributeAccessLevel accessLevel, Class<T> type) Constructs a new agent property with the specified name, logging flag, access level and value type.- Parameters:
name- the name of the property, used to identify it within its attribute setisLogged- whether the property's value is logged as the model progressesaccessLevel- the access level of the property, determining whether other entities may read ittype- the class of the value the property carries
-