gzz.util
Interface Version.Diff
- All Known Implementing Classes:
- SliceVersion.Diff
- Enclosing interface:
- Version
- public static interface Version.Diff
A diff between two Version
s.
It must hold that w.getDiffFrom(v).applyTo(v).equals(w)
for all Version
s v
and w
of the same kind.
inverse
public Version.Diff inverse()
- Return the inverse of this diff.
applyTo
public Version applyTo(Version old)
- Apply the diff to a
Version
and return
the result. The Version
must be of the same
kind as the Version
s this diff was
generated from.
isEmpty
public boolean isEmpty()
- Whether this is the empty diff.
It must hold that
v.equals(diff.applyTo(v))
for all Version
s v
and
Version.Diff
s diff
of the
matching kind, iff diff.isEmpty()
.
We need this method because we never want to save
empty diffs...