public class Isomorphism
extends java.lang.Object
deep copy
operations.
So long as mappings are obtained through the isomorphism they will only be
made at most once, and results of mapping will not be re-mapped in chains.
An isomorphism can be used across multiple deep copy operations, to build a copy of a "forest" of object graphs.
An isomorphism cannot be reused over the same object after that object has been mutated.
Please take care! If a different mapping function is used on an object which has already been mapped, heap pollution may occur when the previous mapping result is cast to the new expected result type.
Modifier and Type | Class and Description |
---|---|
static interface |
Isomorphism.IsomorphismProxy
Marker interface for proxies created by
Isomorphism . |
class |
Isomorphism.Mapping
The main API surface for interacting with the
Isomorphism ,
represents a mapping according to a given key equality. |
Constructor and Description |
---|
Isomorphism() |
Modifier and Type | Method and Description |
---|---|
Isomorphism.Mapping |
byEquality() |
Isomorphism.Mapping |
byIdentity() |
public Isomorphism.Mapping byIdentity()
mapping
interface for nodes whose uniqueness is
determined by reference identity.public Isomorphism.Mapping byEquality()
mapping
interface for nodes whose uniqueness is
determined by equality
.