package kernel.function; import kernel.Cell; import kernel.LanguageEnum; import java.util.List; public class Sum extends Function { public Sum(List listCells) { super(listCells); this.names.put(LanguageEnum.FR, "SOMME"); this.names.put(LanguageEnum.EN, "SUM"); } public Double eval() { return this.listCells.stream() .mapToDouble(Cell::getValue) .sum(); } }