Int16 extension type

A robust, heap-allocated 16-bit signed integer wrapper utilizing dart:typed_data.

Unlike the zero-cost variant, Int16 is strictly backed by an Int16List(1). This inherently bounds the variable within standard memory specifications and rigorously guarantees that mathematical operators intuitively overflow using C++ style constraints, exactly mimicking real hardware boundaries, providing complete safety!

on

Constructors

Int16(Int16List _data)
Int16.from(int value)
Dynamically instantiates a Int16 value mapped sequentially into memory.

Properties

value int
Extracts the underlying raw Dart int strictly clamped.
no setter

Methods

addChecked(Int16 other) Int16
Adds other dynamically intercepting any numerical layout overflow triggering a Dart StateError.
mulChecked(Int16 other) Int16
Evaluates exact strict mathematical bounding conditions without truncating natively.
subChecked(Int16 other) Int16
Subtracts other throwing a programmatic bounds break upon underflow.

Operators

operator %(Int16 other) Int16
Modulo remainder constraint matching natively bounded data models.
operator &(Int16 other) Int16
Bitwise AND logically coupled to bit patterns.
operator *(Int16 other) Int16
Multiplication mathematically clipped naturally to standard hardware constraints.
operator +(Int16 other) Int16
Standard addition. Natively handles and wraps exact numerical overflows gracefully.
operator -(Int16 other) Int16
Standard subtraction. Computes precise arithmetic underflows independently.
operator <(Int16 other) bool
Returns true if this value evaluates less than other.
operator <<(int shiftAmount) Int16
Left-shifts the integer's bits gracefully overflowing when passing the bit barrier.
operator <=(Int16 other) bool
Returns true if this bounds-checked value is less than or equal to other.
operator >(Int16 other) bool
Strict evaluation if this numerical element is larger.
operator >=(Int16 other) bool
Strict evaluation extending identical size bounds.
operator >>(int shiftAmount) Int16
Right-shifts the numerical data maintaining standard sign retention.
operator ^(Int16 other) Int16
Bitwise XOR operator.
operator |(Int16 other) Int16
Bitwise OR operator.
operator ~() Int16
Bitwise NOT standardly shifting limits.
operator ~/(Int16 other) Int16
Truncating division.

Static Properties

max Int16
Returns the statically-bounded maximum value of a 16-bit signed integer (32767).
final
min Int16
Returns the statically-bounded minimum value of a 16-bit signed integer (-32768).
final