top of page

RealInt32

Flag4j provides two reference implementations of the Ring interface through the RealInt16 and RealInt32 classes. This page will cover the 32-bit variant.
The RealInt32 class is immutable and represents a 32-bit integer variable that supports the operations defined on rings. It is essentially a thin wrapper around Java's primitive int type.

Initialization

A RealInt32 value can be initialized from a primitive int or using Java's Integer wrapper.
In addition to these constructors, some basic constants are also provided for convenience.

Arithmetic

RealInt32 objects support all the basic arithmetic operations of a general ring.
For a full list of supported operations see the Javadoc API reference.
bottom of page