units / org.apache.tuweni.units.bigints / UInt256 / valueOf

valueOf

static fun valueOf(value: Long): UInt256 (source)

Return a UInt256 containing the specified value.

Parameters

value - The value to create a UInt256 for.

Exceptions

IllegalArgumentException - If the value is negative.

Return
A UInt256 containing the specified value.

static fun valueOf(value: BigInteger): UInt256 (source)

Return a UInt256 containing the specified value.

Parameters

value - the value to create a UInt256 for

Exceptions

IllegalArgumentException - if the value is negative or too large to be represented as a UInt256

Return
a UInt256 containing the specified value