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

tech.deepdreams.worker.services.deductionbasis.GrossSalaryv2020Impl Maven / Gradle / Ivy

There is a newer version: 0.0.4-RELEASE
Show newest version
package tech.deepdreams.worker.services.deductionbasis;
import static tech.deepdreams.worker.constants.LocalConstantCode.*;
import java.util.Map;
import tech.deepdreams.worker.api.services.DeductionBasisService;
import tech.deepdreams.worker.api.enums.CountryCode;

public class GrossSalaryv2020Impl implements DeductionBasisService{

	
	public Double calculate(Map params, Map advantagesInKind) {
		
		return params.entrySet()
					.stream()
					.filter(entry -> {
						int key = Integer.parseInt(entry.getKey()) ;
						return key >= 200 && key <= 369 ;       
					})
					.mapToDouble(entry -> {					
						return Double.parseDouble(entry.getValue().toString()) ;
					})
					.sum() ;
	}

	
	public CountryCode country() {
		return CountryCode.CIV ;
	}

	
	public String code() {
		return CODE_GROSS_SALARY ;
	}

	
	public int version() {
		return 2020 ;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy