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

UInt256

class UInt256 : UInt256Value<UInt256!> (source)

An unsigned 256-bit precision number. This is a raw UInt256Value - a 256-bit precision unsigned number of no particular unit.

Properties

MAX_VALUE

The maximum value of a UInt256

static val MAX_VALUE: UInt256!

MIN_VALUE

The minimum value of a UInt256

static val MIN_VALUE: UInt256!

ONE

The value 1

static val ONE: UInt256!

ZERO

The value 0

static val ZERO: UInt256!

Functions

add

fun add(value: UInt256!): UInt256!
fun add(value: Long): UInt256!

addMod

fun addMod(value: UInt256!, modulus: UInt256!): UInt256!
fun addMod(value: Long, modulus: UInt256!): UInt256!
fun addMod(value: Long, modulus: Long): UInt256!

and

Return a bit-wise AND of this value and the supplied value.

fun and(value: UInt256!): UInt256!

Return a bit-wise AND of this value and the supplied bytes.

fun and(bytes: Bytes32!): UInt256!

bitLength

fun bitLength(): Int

compareTo

fun compareTo(other: UInt256!): Int

divide

fun divide(value: UInt256!): UInt256!
fun divide(value: Long): UInt256!

divideCeil

fun divideCeil(value: UInt256!): UInt256!
fun divideCeil(value: Long): UInt256!

equals

fun equals(other: Any?): Boolean

fitsInt

fun fitsInt(): Boolean

fitsLong

fun fitsLong(): Boolean

fromBytes

Return a UInt256 containing the value described by the specified bytes.

static fun fromBytes(bytes: Bytes!): UInt256!

fromHexString

Parse a hexadecimal string into a UInt256.

static fun fromHexString(str: String!): UInt256!

hashCode

fun hashCode(): Int

intValue

fun intValue(): Int

isZero

fun isZero(): Boolean

mod

fun mod(modulus: UInt256!): UInt256!
fun mod(modulus: Long): UInt256!

mod0

fun mod0(modulus: UInt256!): UInt256!
fun mod0(modulus: Long): UInt256!

multiply

fun multiply(value: UInt256!): UInt256!
fun multiply(value: Long): UInt256!

multiplyMod

fun multiplyMod(value: UInt256!, modulus: UInt256!): UInt256!
fun multiplyMod(value: Long, modulus: UInt256!): UInt256!
fun multiplyMod(value: Long, modulus: Long): UInt256!

not

Return a bit-wise NOT of this value.

fun not(): UInt256!

numberOfLeadingZeros

fun numberOfLeadingZeros(): Int

or

Return a bit-wise OR of this value and the supplied value.

fun or(value: UInt256!): UInt256!

Return a bit-wise OR of this value and the supplied bytes.

fun or(bytes: Bytes32!): UInt256!

pow

fun pow(exponent: UInt256!): UInt256!
fun pow(exponent: Long): UInt256!

shiftLeft

Shift all bits in this value to the left.

fun shiftLeft(distance: Int): UInt256!

shiftRight

Shift all bits in this value to the right.

fun shiftRight(distance: Int): UInt256!

subtract

fun subtract(value: UInt256!): UInt256!
fun subtract(value: Long): UInt256!

toBigInteger

fun toBigInteger(): BigInteger!

toBytes

fun toBytes(): Bytes32!

toLong

fun toLong(): Long

toMinimalBytes

fun toMinimalBytes(): Bytes!

toString

fun toString(): String

toUInt256

fun toUInt256(): UInt256!

valueOf

Return a UInt256 containing the specified value.

static fun valueOf(value: Long): UInt256!

Return a UInt256 containing the specified value.

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

xor

Return a bit-wise XOR of this value and the supplied value.

fun xor(value: UInt256!): UInt256!

Return a bit-wise XOR of this value and the supplied bytes.

fun xor(bytes: Bytes32!): UInt256!