HashCodeGenerator class
A utility class for generating consistent and efficient hash codes for collections and objects.
Constructors
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
-
generateBytesHashCode(
List< int> bytes, [List<Object> optional = const []]) → int - Generates a hash code for a list of bytes, optionally including additional objects in the calculation.
-
generateDeepHashCode(
Object? object, {bool sorting = false}) → int -
Recursively hashes
object, including Maps and Iterables. Withsorting, map entries/elements are hashed in a canonical (hash-code) order first, so the result doesn't depend on iteration order. -
generateHashCode(
Iterable< Object?> objects) → int - Generates a hash code for a collection of objects, recursively handling nested iterables.