tuweni / org.apache.tuweni.units.bigints / UInt256Value / addMod

addMod

abstract fun addMod(value: T, modulus: UInt256!): T (source)

Returns a value equivalent to ((this + value) mod modulus).

Parameters

value - T: The amount to be added to this value.

modulus - UInt256!: The modulus.

Exceptions

ArithmeticException - modulus == 0.

Return
T: (this + value) mod modulus

abstract fun addMod(value: Long, modulus: UInt256!): T (source)

Returns a value equivalent to ((this + value) mod modulus).

Parameters

value - Long: The amount to be added to this value.

modulus - UInt256!: The modulus.

Exceptions

ArithmeticException - modulus == 0.

Return
T: (this + value) mod modulus

abstract fun addMod(value: Long, modulus: Long): T (source)

Returns a value equivalent to ((this + value) mod modulus).

Parameters

value - Long: The amount to be added to this value.

modulus - Long: The modulus.

Exceptions

ArithmeticException - modulus ≤ 0.

Return
T: (this + value) mod modulus