Differ
Interfaces for describing changes to a value as patches. A Differ<T, Patch> compares an old and new value, creates a patch for the difference, combines patches in order, and applies a patch to an old value to produce an updated value.
Interfaces for describing changes to a value as patches. A Differ<T, Patch> compares an old and new value, creates a patch for the difference, combines patches in order, and applies a patch to an old value to produce an updated value.
Describes how to compute, combine, and apply patches for values of type
T.When to use
Use to model patch-based updates for a value type when callers need to compute a patch from two values, combine patches, and apply a patch later.
Details
A
Differprovides an empty patch, computes the patch between two values, combines patches, and applies a patch to an old value to produce an updated value.