Skip to content

Release 3.2.0

Bartłomiej Góra edited this page Jun 23, 2017 · 1 revision

Version 3.2.0:

IMPORTANT: Changed package names from

    pl.bgora.rpn

to

com.github.bgora.rpnlibrary

Fixed bug, that prevented from exucuting functions with multiple parameters.

New functions: max() - takes two parameters, returns greater one min() - take two parameters, returns less one fib() - Fibonacci number

Refactor:

Changed createCalulator, and getDefaultEngine to use CalculationEngine interface

    /**
     * Creates AdvanceCalculator with given CalculatorEngine
     *
     * @param engine CalculationEngine implementation
     * @return AdvanceCalculator
     */
    public CalculatorInterface createCalulator(CalculationEngine engine) {
        return new AdvancedCalculator(RoundingMode.HALF_UP, engine);
    }


    /**
     * Return default CalculationEngine implementation
     *
     * @return CalculatorEngine
     */
    public CalculationEngine getDefaultEngine() {
        return new CalculatorEngine(StrategiesUtil.DEFAULT_OPERATORS, StrategiesUtil.DEFAULT_FUNCTIONS);
    }
Clone this wiki locally