public class MergeContext extends Object
This class represents the current context for a remapping operation for a MappingSetMergerHandler. This
allows implementers of MappingSetMergerHandlers access to each of the 4 combinations of mappings for a merge:
This class represents a performance advantage for retrieving the reverse of the mappings as well, as it only computes the value of the reverse mapping set when requested, and only computes the value once per merge session.
This class is thread safe and all methods are reentrant.
| Constructor and Description |
|---|
MergeContext(MappingSet left,
MappingSet right)
Create a new
MappingSet merge context. |
| Modifier and Type | Method and Description |
|---|---|
MappingSet |
getLeft() |
MappingSet |
getLeftReversed() |
MappingSet |
getRight() |
MappingSet |
getRightReversed() |
public MergeContext(MappingSet left, MappingSet right)
MappingSet merge context. Provide the left and right mapping sets for the merge, neither may
be null.left - The left mapping set, must not be null.right - The right mapping set, must not be null.public MappingSet getLeft()
left MappingSet for the merge operation, not null.public MappingSet getRight()
right MappingSet for the merge operation, not null.public MappingSet getLeftReversed()
right MappingSet for the merge operation, but reversed. Never
null. This method computes the value on first query and caches the result, making it more
efficient than calling MappingSet.reverse() yourself.public MappingSet getRightReversed()
right MappingSet for the merge operation, but reversed. Never
null. This method computes the value on first query and caches the result, making it more
efficient than calling MappingSet.reverse() yourself.