equalsIgnoringHashCodes function
- Object value
Asserts that two Strings or Iterable<String>
s are equal after
normalizing likely hash codes.
A #
followed by 5 hexadecimal digits is assumed to be a short hash code
and is normalized to #00000
.
Only String or Iterable<String>
are allowed types for value
.
See Also:
- describeIdentity, a method that generates short descriptions of objects
with ids that match the pattern
#[0-9a-f]{5}
. - shortHash, a method that generates a 5 character long hexadecimal String based on Object.hashCode.
- DiagnosticableTree.toStringDeep, a method that returns a String typically containing multiple hash codes.
Implementation
Matcher equalsIgnoringHashCodes(Object value) {
assert(value is String || value is Iterable<String>, "Only String or Iterable<String> are allowed types for equalsIgnoringHashCodes, it doesn't accept ${value.runtimeType}");
return _EqualsIgnoringHashCodes(value);
}