money.rave.common.backend.expression.operator.Plus.kt Maven / Gradle / Ivy
package money.rave.common.backend.expression
import money.rave.common.backend.expression.EvaluationContext
import money.rave.common.backend.expression.Expression
import java.math.BigDecimal
class Plus(
children: List>,
private val defaultCandleIndex: Int = 0,
) : Operator(children) {
override fun evaluate(context: EvaluationContext, candleIndex: Int): BigDecimal =
children.sumOf { it.evaluate(context, defaultCandleIndex + candleIndex) }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy