Class Effectives
java.lang.Object
org.ametys.plugins.odfpilotage.cost.entity.Effectives
Class representing
Effectives
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addComputedLocalEffective
(String path, Double calculatedEffectiveLocal) Set the calculated local effectiveboolean
Check if a local effective has been computed for the given pathGet the calculated global effectiveGet the computed local effective for a given pathGet the entered effectiveGet the program item idvoid
globalhWeight
(double globalWeight) Apply a weight to all effectives by stepvoid
localWeight
(double localWeight, String path) Apply a weight on the local effectivevoid
setComputedGlobalEffective
(Double calculatedGlobalEffective) Set the calculated global effectivevoid
setEnteredEffective
(Optional<Double> enteredEffective) Set the entered effectivevoid
sum
(Effectives effectives, String childPath, String parentPath) Sum two Effectivesvoid
sumGlobalEffective
(double globalEffective) Sum the global effectivesvoid
sumLocalEffective
(Effectives effectives, String childPath, String parentPath) Sum two local effectives
-
Constructor Details
-
Effectives
The constructor- Parameters:
programItemId
- the program item id
-
-
Method Details
-
getEnteredEffective
Get the entered effective- Returns:
- the entered effective
-
setEnteredEffective
Set the entered effective- Parameters:
enteredEffective
- the entered effective
-
getComputedLocalEffective
Get the computed local effective for a given path- Parameters:
path
- the current path- Returns:
- the calculated local effective
-
containsComputedLocalEffective
Check if a local effective has been computed for the given path- Parameters:
path
- the path- Returns:
- true if the local effective is computed
-
addComputedLocalEffective
Set the calculated local effective- Parameters:
path
- the current pathcalculatedEffectiveLocal
- the calculated local effective
-
getComputedGlobalEffective
Get the calculated global effective- Returns:
- the calculated global effective
-
setComputedGlobalEffective
Set the calculated global effective- Parameters:
calculatedGlobalEffective
- the calculated global effective
-
getProgramItemId
Get the program item id- Returns:
- the program item id
-
sum
Sum two Effectives- Parameters:
effectives
- the second effective to sumchildPath
- the path of the old local effective valueparentPath
- the path of the new local effective value
-
sumLocalEffective
Sum two local effectives- Parameters:
effectives
- the second effective to sumchildPath
- the path of the old local effective valueparentPath
- the path old the new local effective value
-
sumGlobalEffective
Sum the global effectives- Parameters:
globalEffective
- the global effective
-
localWeight
Apply a weight on the local effective- Parameters:
localWeight
- the weightpath
- the path of the new local effective
-
globalhWeight
Apply a weight to all effectives by step- Parameters:
globalWeight
- the weight
-