CompareUtils class

Comparison and equality helpers for lists, maps, and grouping.

Constructors

CompareUtils()

Properties

hashCode → int
The hash code for this object.
no setterinherited
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

Static Methods

chunk<T>(List<T> items, int chunk) → List<List<T>>
Splits items into consecutive sublists of at most chunk elements.
constantTimeBigIntEquals(List<BigInt> a, List<BigInt> b) → bool
Constant-time equality check for two same-length lists of BigInt.
groupConsecutive<T>(List<T> items) → List<List<T>>
Groups adjacent equal elements of items together.
iterableConstantTime(Iterable<List<int>> a, Iterable<List<int>> b) → bool
Constant-time equality check for two sequences of byte lists.
iterableIsEqual<T>(Iterable<T>? a, Iterable<T>? b) → bool
Deep, order-sensitive equality for two iterables (null-safe, recurses into nested Maps and Iterables).
mapIsEqual<K, V>(Map<K, V>? a, Map<K, V>? b) → bool
Deep equality for two maps (null-safe, recurses into nested Maps and Iterables).