Class FloatField
java.lang.Object
com.inet.taskplanner.server.api.field.Field
com.inet.taskplanner.server.api.field.FloatField
A field that takes a float number as input.
The field supports place holders from the TaskPlanner, which has to be accounted for
- Since:
- taskplanner 21.0
-
Constructor Summary
ConstructorsConstructorDescriptionFloatField
(String key, String label) Construct the numeric fieldFloatField
(String key, String label, List<com.inet.config.structure.model.UnitConfigProperty.Unit> units) Construct the numeric field including a list ofUnitConfigProperty.Unit
to select between with automatic recalculation. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isValidValue
(String value) Returns true, if the value is validpatchResultPlaceholderInValue
(String value, List<JobResultContainer> results) Override to replace the placeholders with the values from the resultspatchSeriesPlaceholderInValue
(String value, Map<String, String> seriesProperties) Override to replace the placeholders with the values from the seriesMethods inherited from class com.inet.taskplanner.server.api.field.Field
getConditions, getKey, getLabel, getPlaceholder, getType, getValue, isUpdateValuesOnChange, isValueSavable, replaceSeriesPlaceholders, setConditions, setKey, setLabel, setPlaceholder, setType, setType, setUpdateValuesOnChange, setValue, setValueSavable
-
Constructor Details
-
FloatField
Construct the numeric field- Parameters:
key
- the key of the fieldlabel
- the label of the field- Since:
- taskplanner 21.0
-
FloatField
public FloatField(String key, String label, List<com.inet.config.structure.model.UnitConfigProperty.Unit> units) Construct the numeric field including a list ofUnitConfigProperty.Unit
to select between with automatic recalculation.- Parameters:
key
- the key of the fieldlabel
- the label of the fieldunits
- the definition of the units for this field- Since:
- taskplanner 21.0
-
-
Method Details
-
isValidValue
Returns true, if the value is valid- Parameters:
value
- the value to check- Returns:
- true, if the value is valid
- Since:
- taskplanner 21.0
-
patchResultPlaceholderInValue
Override to replace the placeholders with the values from the results- Overrides:
patchResultPlaceholderInValue
in classField
- Parameters:
value
- the value to be patchedresults
- the results that contain the meta properties that are replaced- Returns:
- the new value with replaced placeholders
-
patchSeriesPlaceholderInValue
Override to replace the placeholders with the values from the series- Overrides:
patchSeriesPlaceholderInValue
in classField
- Parameters:
value
- the value to be patchedseriesProperties
- properties from the current series set- Returns:
- the new value with replaced placeholders
-