Interface FormulaHelper
- All Known Implementing Classes:
DefaultFormulaHelper
,GermanyFormulaHelper
public interface FormulaHelper
If a custom formula is needed, add a custom implementation annotated with
Primary
-
Method Summary
Modifier and TypeMethodDescriptiondefault BigDecimal
calculate
(BigDecimal maxPoints, BigDecimal points) validate points and calculate grade seevalidatePoints(BigDecimal, BigDecimal)
andcalculateGrade(BigDecimal, BigDecimal)
calculateGrade
(BigDecimal maxPoints, BigDecimal points) Compute the grade based on the points and the max pointsnode.getMaxPoints()
default void
validatePoints
(BigDecimal maxPoints, BigDecimal points) check if sensible point values were used as arguments
-
Method Details
-
calculate
validate points and calculate grade seevalidatePoints(BigDecimal, BigDecimal)
andcalculateGrade(BigDecimal, BigDecimal)
-
calculateGrade
Compute the grade based on the points and the max pointsnode.getMaxPoints()
- Parameters:
maxPoints
- the max points of the node a grade is calculated forpoints
- the points that were actually reached
-
validatePoints
check if sensible point values were used as arguments- Parameters:
maxPoints
- the max points of the node a grade is calculated forpoints
- the points that were actually reached
-