Class FWSimVarLink
java.lang.Object
net.simplace.sim.model.FWSimVarLink
A link from a source variable to a destination variable, or a fixed value for a destination variable. Links can be
defined by names and resolved later against a var map (see
initialize(FWSimVarMap)).- Author:
- Andreas Enders
-
Constructor Summary
ConstructorsConstructorDescriptionFWSimVarLink(String aSourceFieldName, String aDestFieldName) Creates a link by variable names; the variables are resolved byinitialize(FWSimVarMap).FWSimVarLink(FWSimVariable<?> aDestField, Object aValue) Creates a link that sets a fixed value for a destination variable (no source variable).FWSimVarLink(FWSimVariable<?> aSourceField, FWSimVariable<?> aDestField) Creates a link between two variables. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()voidinitialize(FWSimVarMap aVarMap) Resolves the source (if named) and destination variables from a var map.void
-
Constructor Details
-
FWSimVarLink
Creates a link between two variables.- Parameters:
aSourceField- source variableaDestField- destination variable
-
FWSimVarLink
Creates a link by variable names; the variables are resolved byinitialize(FWSimVarMap).- Parameters:
aSourceFieldName- name of the source variableaDestFieldName- name of the destination variable
-
FWSimVarLink
Creates a link that sets a fixed value for a destination variable (no source variable). Note that the destination name is not stored, soinitialize(FWSimVarMap)cannot be used for such a link.- Parameters:
aDestField- destination variableaValue- the value
-
-
Method Details
-
getValue
- Returns:
- the fixed value, or
nullfor links between variables
-
initialize
Resolves the source (if named) and destination variables from a var map.- Parameters:
aVarMap- var map containing the variables
-
setValue
- Parameters:
aValue- the fixed value to set
-
getSourceField
- Returns:
- the sourceField
-
getSourceFieldName
- Returns:
- the sourceFieldName
-
getDestFieldName
- Returns:
- the destFieldName
-
getDestField
- Returns:
- the destField
-