All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.jbgust.jsrm.infra.pressure.resultprovider.AbstractGrainResultProvider Maven / Gradle / Ivy

package com.github.jbgust.jsrm.infra.pressure.resultprovider;

import com.github.jbgust.jsrm.application.motor.grain.GrainConfigutation;
import com.github.jbgust.jsrm.calculation.ResultLineProvider;

import static java.lang.Double.valueOf;

public abstract class AbstractGrainResultProvider implements ResultLineProvider {

    protected final GrainConfigutation grainConfigutation;
    protected final int numberLineDuringBurnCalculation;

    public AbstractGrainResultProvider(GrainConfigutation grainConfigutation, int numberLineDuringBurnCalculation) {
        this.grainConfigutation = grainConfigutation;
        this.numberLineDuringBurnCalculation = numberLineDuringBurnCalculation;
    }

    protected double getProgression(int lineNumber) {
        return valueOf(lineNumber)/valueOf(numberLineDuringBurnCalculation-1);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy