Class Effectives

java.lang.Object
org.ametys.plugins.odfpilotage.cost.entity.Effectives

public class Effectives extends Object
Class representing Effectives
  • Constructor Details

    • Effectives

      public Effectives(String programItemId)
      The constructor
      Parameters:
      programItemId - the program item id
  • Method Details

    • getEnteredEffective

      Get the entered effective
      Returns:
      the entered effective
    • setEnteredEffective

      public void setEnteredEffective(Optional<Double> enteredEffective)
      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

      public boolean containsComputedLocalEffective(String path)
      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

      public void addComputedLocalEffective(String path, Double calculatedEffectiveLocal)
      Set the calculated local effective
      Parameters:
      path - the current path
      calculatedEffectiveLocal - the calculated local effective
    • getComputedGlobalEffective

      Get the calculated global effective
      Returns:
      the calculated global effective
    • setComputedGlobalEffective

      public void setComputedGlobalEffective(Double calculatedGlobalEffective)
      Set the calculated global effective
      Parameters:
      calculatedGlobalEffective - the calculated global effective
    • getProgramItemId

      Get the program item id
      Returns:
      the program item id
    • sum

      public void sum(Effectives effectives, String childPath, String parentPath)
      Sum two Effectives
      Parameters:
      effectives - the second effective to sum
      childPath - the path of the old local effective value
      parentPath - the path of the new local effective value
    • sumLocalEffective

      public void sumLocalEffective(Effectives effectives, String childPath, String parentPath)
      Sum two local effectives
      Parameters:
      effectives - the second effective to sum
      childPath - the path of the old local effective value
      parentPath - the path old the new local effective value
    • sumGlobalEffective

      public void sumGlobalEffective(double globalEffective)
      Sum the global effectives
      Parameters:
      globalEffective - the global effective
    • localWeight

      public void localWeight(double localWeight, String path)
      Apply a weight on the local effective
      Parameters:
      localWeight - the weight
      path - the path of the new local effective
    • globalhWeight

      public void globalhWeight(double globalWeight)
      Apply a weight to all effectives by step
      Parameters:
      globalWeight - the weight