T - The data type contained in the property.public class ConstantProperty<T> extends Property<T>
| Constructor and Description |
|---|
ConstantProperty(T value)
Create a new instance with the provided default value.
|
ConstantProperty(T value,
MoxieTime referenceTime)
Create a new instance with the provided default value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assignValue(T value)
This is called from
Property.setValue(Object) after checking the read-only state of the property. |
MoxieTime |
getTimeOfLatestChange()
Gets the time when the data contained within this property last changed to a different instance or value.
|
protected T |
retrieveValue()
This returns the value held in this property at the current simulation time.
|
void |
wireupValue(T value)
This is called from
Property.wireupData(Object) providing the value from this property's slot in the instance specification. |
getModelInformation, getValue, onWireupModel, setValue, toString, wireupData, wireupModel, wrapPropertyOperationException, wrapPropertyOperationException, wrapPropertyTypeException, wrapPropertyTypeExceptionpublic ConstantProperty(T value)
MoxieTime.getMinValue() as the last time of change.value - The default value.public ConstantProperty(T value, MoxieTime referenceTime)
value - The default value.referenceTime - The time that will be used as the getTimeOfLatestChange().public MoxieTime getTimeOfLatestChange()
PropertyMoxieTime.getMinValue(). For mutable properties, this likely represents the time at which the last instance was assigned to the
property. For custom properties, this may always return the TimeProvider.getCurrentTime() to represent cases where the value is
computed on demand based on the current values of other properties and custom analysis.getTimeOfLatestChange in class Property<T>Property.getValue() changed value.public void wireupValue(T value)
PropertyProperty.wireupData(Object) providing the value from this property's slot in the instance specification. This is called
once prior to starting the simulation and is allowed even if the property is read-only.wireupValue in class Property<T>value - The value from the instance specification.protected T retrieveValue()
PropertyretrieveValue in class Property<T>public void assignValue(T value)
PropertyProperty.setValue(Object) after checking the read-only state of the property.assignValue in class Property<T>value - The new value to assign to this property.