code: public static BigDecimal addWeightedConstituent(final BigDecimal runningWeightedVal, final BigDecimal valueToAdd,
              final BigDecimal weightForValueToAdd, final BigDecimal totalWeight) {
          return BigDecimalUtil.doAdd(runningWeightedVal,
                  BigDecimalUtil.divide(BigDecimalUtil.multiply(valueToAdd, BigDecimalUtil.abs(weightForValueToAdd)), BigDecimalUtil.abs(totalWeight),
                          BigDecimal.ROUND_HALF_UP));
      }
docs: Calculate the weight of the constituent and add it to the running weighted value.
  runningWeightedVal + valueToAdd * weightForValueToAdd / totalWeight
  @param runningWeightedVal
  @param valueToAdd
  @param weightForValueToAdd
  @param totalWeight
  @return