public final class TransformationResult extends Object
DifferenceTransform.tryTransform(Element, Element, Difference)
is called.Modifier and Type | Class and Description |
---|---|
static class |
TransformationResult.Resolution
The resolution of the difference transformation
|
Modifier and Type | Method and Description |
---|---|
static TransformationResult |
discard() |
Set<Difference> |
getDifferences()
The difference passed to
the
DifferenceTransform.tryTransform(Element, Element, Difference) method will be
replaced by the differences returned from this method. |
TransformationResult.Resolution |
getResolution() |
static TransformationResult |
keep() |
static TransformationResult |
replaceWith(Difference newDifference)
Same as
replaceWith(Set) only for replacing with just a single difference. |
static TransformationResult |
replaceWith(Set<Difference> newDifferences) |
static TransformationResult |
undecided() |
public static TransformationResult keep()
public static TransformationResult discard()
public static TransformationResult undecided()
public static TransformationResult replaceWith(Set<Difference> newDifferences)
newDifferences
- the new set of differences to replace the old withpublic static TransformationResult replaceWith(Difference newDifference)
replaceWith(Set)
only for replacing with just a single difference.newDifference
- the difference to transform the original difference topublic TransformationResult.Resolution getResolution()
@Nullable public Set<Difference> getDifferences()
DifferenceTransform.tryTransform(Element, Element, Difference)
method will be
replaced by the differences returned from this method.
null
and an empty set are treated equivalently.
This method is only returns meaningful data when the resolution is TransformationResult.Resolution.REPLACE
.
Copyright © 2014-2021 Lukas Krejci. All Rights Reserved.