ElemRange class

The inclusive range an integer array's elements may take under the schema — the range of an InlineInt64Array — or, as ElemRange.boolean, the rule of a boolean array.

Both bounds are int, which is what the decoder produces: a signed element arrives zig-zag-decoded, an unsigned one raw, and Dart's int is the same 64-bit two's-complement word either way.

The widest NARROWED unsigned kind is u32, so max never reaches 2^63 and an unsigned wire value whose top bit is set — which Dart's int shows as negative — is always out of range. That is why the unsigned comparison reads raw < 0 || raw > max rather than raw > max: an unsigned compare, written in a language without one.

Constructors

ElemRange(int min, int max)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
isBoolean → bool
Whether this is ElemRange.boolean.
final
max → int
final
min → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

boolean → const ElemRange
The rule of a boolean array (CORELIB_PLAN §4.4): every element is in range, and every one other than 0 is held as 1 — so a decoded 2 reads back as the true it is and re-encodes canonically. It rides the range channel so an array with neither a width nor booleans pays nothing for it.