units / org.apache.tuweni.units.bigints

Package org.apache.tuweni.units.bigints

Types

BaseUInt256Value

abstract class BaseUInt256Value<T : UInt256Value<T>> : UInt256Value<T>

Base class for UInt256Value.

This class is abstract as it is not meant to be used directly, but it has no abstract methods. As mentioned in UInt256Value, this is used to create strongly-typed type aliases of UInt256. In other words, this allow to "tag" numbers with the unit of what they represent for the type-system, which can help clarity, but also forbid mixing numbers that are mean to be of different units (the strongly-typed part).

This class implements UInt256Value, but also adds a few operations that take a UInt256 directly, for instance #multiply(UInt256). The rational is that multiplying a given quantity of something by a "raw" number is always meaningful, and return a new quantity of the same thing.

BaseUInt32Value

abstract class BaseUInt32Value<T : UInt32Value<T>> : UInt32Value<T>

Base class for UInt32Value.

This class is abstract as it is not meant to be used directly, but it has no abstract methods. As mentioned in UInt32Value, this is used to create strongly-typed type aliases of UInt32. In other words, this allow to "tag" numbers with the unit of what they represent for the type-system, which can help clarity, but also forbid mixing numbers that are mean to be of different units (the strongly-typed part).

This class implements UInt32Value, but also adds a few operations that take a UInt32 directly, for instance #multiply(UInt32). The rational is that multiplying a given quantity of something by a "raw" number is always meaningful, and return a new quantity of the same thing.

BaseUInt384Value

abstract class BaseUInt384Value<T : UInt384Value<T>> : UInt384Value<T>

Base class for UInt384Value.

This class is abstract as it is not meant to be used directly, but it has no abstract methods. As mentioned in UInt384Value, this is used to create strongly-typed type aliases of UInt384. In other words, this allow to "tag" numbers with the unit of what they represent for the type-system, which can help clarity, but also forbid mixing numbers that are mean to be of different units (the strongly-typed part).

This class implements UInt384Value, but also adds a few operations that take a UInt384 directly, for instance #multiply(UInt384). The rational is that multiplying a given quantity of something by a "raw" number is always meaningful, and return a new quantity of the same thing.

BaseUInt64Value

abstract class BaseUInt64Value<T : UInt64Value<T>> : UInt64Value<T>

Base class for UInt64Value.

This class is abstract as it is not meant to be used directly, but it has no abstract methods. As mentioned in UInt64Value, this is used to create strongly-typed type aliases of UInt64. In other words, this allow to "tag" numbers with the unit of what they represent for the type-system, which can help clarity, but also forbid mixing numbers that are mean to be of different units (the strongly-typed part).

This class implements UInt64Value, but also adds a few operations that take a UInt64 directly, for instance #multiply(UInt64). The rational is that multiplying a given quantity of something by a "raw" number is always meaningful, and return a new quantity of the same thing.

UInt256

class UInt256 : UInt256Value<UInt256>

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

UInt256Domain

class UInt256Domain : DiscreteDomain<UInt256>

A DiscreteDomain over UInt256.

UInt256Value

interface UInt256Value<T : UInt256Value<T>> : Comparable<T>

Represents a 256-bit (32 bytes) unsigned integer value.

A UInt256Value is an unsigned integer value stored with 32 bytes, so whose value can range between 0 and 2^256-1.

This interface defines operations for value types with a 256-bit precision range. The methods provided by this interface take parameters of the same type (and also long. This provides type safety by ensuring calculations cannot mix different UInt256Value types.

Where only a pure numerical 256-bit value is required, UInt256 should be used.

It is strongly advised to extend BaseUInt256Value rather than implementing this interface directly. Doing so provides type safety in that quantities of different units cannot be mixed accidentally.

UInt256ValueDomain

class UInt256ValueDomain<T : UInt256Value<T>> : DiscreteDomain<T>

A DiscreteDomain over a UInt256Value.

UInt256s

class UInt256s

Static utility methods on UInt256 values.

UInt32

class UInt32 : UInt32Value<UInt32>

An unsigned 32-bit precision number. This is a raw UInt32Value - a 32-bit precision unsigned number of no particular unit.

UInt32Domain

class UInt32Domain : DiscreteDomain<UInt32>

A DiscreteDomain over UInt32.

UInt32Value

interface UInt32Value<T : UInt32Value<T>> : Comparable<T>

Represents a 32-bit (8 bytes) unsigned integer value.

A UInt32Value is an unsigned integer value whose value can range between 0 and 2^32-1.

This interface defines operations for value types with a 32-bit precision range. The methods provided by this interface take parameters of the same type (and also long. This provides type safety by ensuring calculations cannot mix different UInt32Value types.

Where only a pure numerical 32-bit value is required, UInt32 should be used.

It is strongly advised to extend BaseUInt32Value rather than implementing this interface directly. Doing so provides type safety in that quantities of different units cannot be mixed accidentally.

UInt32ValueDomain

class UInt32ValueDomain<T : UInt32Value<T>> : DiscreteDomain<T>

A DiscreteDomain over a UInt32Value.

UInt32s

class UInt32s

Static utility methods on UInt32 values.

UInt384

class UInt384 : UInt384Value<UInt384>

An unsigned 384-bit precision number. This is a raw UInt384Value - a 384-bit precision unsigned number of no particular unit.

UInt384Domain

class UInt384Domain : DiscreteDomain<UInt384>

A DiscreteDomain over UInt384.

UInt384Value

interface UInt384Value<T : UInt384Value<T>> : Comparable<T>

Represents a 384-bit (48 bytes) unsigned integer value.

A UInt384Value is an unsigned integer value stored with 48 bytes, so whose value can range between 0 and 2^384-1.

This interface defines operations for value types with a 384-bit precision range. The methods provided by this interface take parameters of the same type (and also long. This provides type safety by ensuring calculations cannot mix different UInt384Value types.

Where only a pure numerical 384-bit value is required, UInt384 should be used.

It is strongly advised to extend BaseUInt384Value rather than implementing this interface directly. Doing so provides type safety in that quantities of different units cannot be mixed accidentally.

UInt384ValueDomain

class UInt384ValueDomain<T : UInt384Value<T>> : DiscreteDomain<T>

A DiscreteDomain over a UInt384Value.

UInt384s

class UInt384s

Static utility methods on UInt384 values.

UInt64

class UInt64 : UInt64Value<UInt64>

An unsigned 64-bit precision number. This is a raw UInt64Value - a 64-bit precision unsigned number of no particular unit.

UInt64Domain

class UInt64Domain : DiscreteDomain<UInt64>

A DiscreteDomain over UInt64.

UInt64Value

interface UInt64Value<T : UInt64Value<T>> : Comparable<T>

Represents a 64-bit (8 bytes) unsigned integer value.

A UInt64Value is an unsigned integer value whose value can range between 0 and 2^64-1.

This interface defines operations for value types with a 64-bit precision range. The methods provided by this interface take parameters of the same type (and also long. This provides type safety by ensuring calculations cannot mix different UInt64Value types.

Where only a pure numerical 64-bit value is required, UInt64 should be used.

It is strongly advised to extend BaseUInt64Value rather than implementing this interface directly. Doing so provides type safety in that quantities of different units cannot be mixed accidentally.

UInt64ValueDomain

class UInt64ValueDomain<T : UInt64Value<T>> : DiscreteDomain<T>

A DiscreteDomain over a UInt64Value.

UInt64s

class UInt64s

Static utility methods on UInt64 values.