Class Effectives

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

public class Effectives extends Object
Class representing Effectives
  • Constructor Details

  • Method Details

    • cloneWithWeight

      public Effectives cloneWithWeight(double weight)
      Apply a weight to all effectives by step of a program item but not save it.
      Parameters:
      weight - the weight
      Returns:
      A clone of the effectives but with a weight
    • setOverriddenEffective

      public void setOverriddenEffective(Optional<Double> overriddenEffective)
      Set the overridden effectives by the cost computation tool
      Parameters:
      overriddenEffective - An Optional of the overridden effective
    • setEnteredEffective

      public void setEnteredEffective(Optional<Double> enteredEffective)
      Set the entered effectives in the 'numberOfStudentsEstimated' attribute
      Parameters:
      enteredEffective - An Optional of the entered effective
    • addEstimatedEffective

      public void addEstimatedEffective(String itemPath, Double estimatedEffective)
      Add an estimated effective to the existing one.
      Parameters:
      itemPath - The item path
      estimatedEffective - The estimated effective
    • addComputedEffective

      public void addComputedEffective(String step, Double computedEffective)
      Add a computed effective to the existing one.
      Parameters:
      step - The step id
      computedEffective - The computed effective
    • add

      public void add(Effectives effectivesToAdd, String nameInPath)
      Add the effectives to the current effectives
      Parameters:
      effectivesToAdd - the parent effectives
      nameInPath - the name to add in the path
    • sum

      public void sum(Effectives effectivesToAdd)
      Sum effectives to the current effectives
      Parameters:
      effectivesToAdd - the child effectives
    • getEnteredEffective

      Get the entered effectives in the 'numberOfStudentsEstimated' attribute
      Returns:
      an Optional of the entered effective, Optional.empty() if not defined
    • getOverriddenEffective

      Get the overridden effectives by the cost computation tool
      Returns:
      an Optional of the overridden effective, Optional.empty() if not defined
    • getEstimatedEffective

      Get the global estimated effective
      Returns:
      the estimated effective
    • getEstimatedEffectiveByPath

      Get the local estimated effectives by path
      Returns:
      the estimated effectives by path
    • getComputedEffective

      Get the global computed effective
      Returns:
      the computed effective
    • getComputedEffectiveByStep

      Get the local estimated effectives by step
      Returns:
      the computed effectives by step