HashedCloner class base
Cloner with circular reference detection.
Uses HashMap<int,int> to track hash codes of traversed collections to
prevent infinite recursion when encountering circular references.
Throws CircularReferenceCloneException if a circular reference is detected during cloning.
Use when deep-cloning structures that may contain cycles.
- Inheritance
-
- Object
- BaseCloner
- HashedCloner
Properties
- doTypedClone → bool
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cloneList<
E> (List< E> source) → List<E> -
Deep-clones a
Listwith circular reference detection.override -
cloneMap<
K, V> (Map< K, V> source) → Map<K, dynamic> -
Deep-clones an untyped
Map<K, dynamic>with circular reference detection.override -
cloneMapTyped<
K, V> (Map< K, V> source) → Map<K, V> -
Deep-clones a typed
Map<K, V>with circular reference detection.override -
cloneSet<
E> (Set< E> source) → Set<E> -
Deep-clones a
Setwith circular reference detection.override -
cloneValue(
dynamic source) → dynamic -
Deep-clone
sourcewhen possible.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
replicate(
{required bool doTypedClone}) → HashedCloner -
DEPRECATED
returns self instance
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited