Package modelarium.attributes.functional
Class FunctionalProperty<T>
java.lang.Object
modelarium.attributes.Attribute
modelarium.attributes.Property<T>
modelarium.attributes.functional.FunctionalProperty<T>
- Type Parameters:
T- the type of value this property holds
- All Implemented Interfaces:
Serializable,DeepCopyable<Attribute>
A property whose behaviour is defined using functional interfaces.
This implementation allows dynamic configuration of property behaviour, useful when working with external systems or when subclassing is not feasible (e.g., in Python via JPype).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionalProperty(String name, boolean isRecorded, Class<T> type, PropertyGetterFunction<T> getter, PropertySetterFunction<T> setter, PropertyRunFunction<T> runLogic) Constructs a functional property with the given name, type, recording flag, and logic. -
Method Summary
Methods inherited from class modelarium.attributes.Attribute
getAssociatedModelElement, getName, isRecorded, setAssociatedModelElement
-
Constructor Details
-
FunctionalProperty
public FunctionalProperty(String name, boolean isRecorded, Class<T> type, PropertyGetterFunction<T> getter, PropertySetterFunction<T> setter, PropertyRunFunction<T> runLogic) Constructs a functional property with the given name, type, recording flag, and logic.- Parameters:
name- the property nameisRecorded- whether the property is recordedtype- the value type of the propertygetter- logic to retrieve the property valuesetter- logic to update the property valuerunLogic- logic to execute during therun()call
-
-
Method Details