T - The type of the result of the merge handler.public class MergeResult<T> extends Object
This class represents the result of a mapping merge handled by a MappingSetMergerHandler. This
class is only relevant to mapping types which have children, which includes both top level and inner class mappings,
and method mappings.
This class holds 2 values:
When a merge occurs with mappings which contain child data the merger will need to recurse into the child data and merge those mappings too. Depending on the situation this may not be desirable, or you may wish to control specifically which mappings do or don't get merged. Typically there will only be one mapping on the right side, but some situations, such as duplicates and method mappings, may have multiple mappings that you may want merged. By storing those mappings in a list in that class that allows the merger to have the most flexibility in choosing which mappings are or aren't merged.
| Constructor and Description |
|---|
MergeResult(T result)
Create a new
MergeResult with a result and no mappings to merge. |
MergeResult(T result,
List<T> mappingsToMap)
Create a new
MergeResult with a result and a list of mappings to merge. |
MergeResult(T result,
T mappingToMerge)
Create a new
MergeResult with a result and only one mapping to merge. |
public MergeResult(T result)
MergeResult with a result and no mappings to merge.result - The result of the merge operation, may be null.public MergeResult(T result, T mappingToMerge)
MergeResult with a result and only one mapping to merge.result - The result of the merge operation, may be null.mappingToMerge - The mapping to merge into the result, must not be null.public MergeResult(T result, List<T> mappingsToMap)
MergeResult with a result and a list of mappings to merge.result - The result of the merge operation, may be null.mappingsToMap - The mappings to merge into the result, must not be null, and no entries
may be null. May be empty.public T getResult()
null.public List<T> getMappingsToMap()
getResult(). Cannot be
null.