public class TagMergeItem extends Object
Modifier and Type | Field and Description |
---|---|
private String |
key |
private MergeDecisionType |
mergeDecision |
private String |
myTagValue |
private String |
theirTagValue |
Constructor and Description |
---|
TagMergeItem(String key,
OsmPrimitive my,
OsmPrimitive their)
constructor
|
TagMergeItem(String key,
String myTagValue,
String theirTagValue)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
applyToMyPrimitive(OsmPrimitive primitive)
applies the current merge decisions to the tag set of an OSM primitive.
|
void |
decide(MergeDecisionType decision)
applies a merge decision to this merge item
|
String |
getKey() |
MergeDecisionType |
getMergeDecision() |
String |
getMyTagValue() |
String |
getTheirTagValue() |
private final String myTagValue
private final String theirTagValue
private MergeDecisionType mergeDecision
public TagMergeItem(String key, String myTagValue, String theirTagValue)
key
- the common tag key. Must not be null.myTagValue
- the value for this key known in the local datasettheirTagValue
- the value for this key known in the dataset on the serverIllegalArgumentException
- if key is nullpublic TagMergeItem(String key, OsmPrimitive my, OsmPrimitive their)
key
- the tag key common to the merged OSM primitives. Must not be null.my
- my version of the OSM primitive (i.e. the version known in the local dataset). Must not be null.their
- their version of the OSM primitive (i.e. the version known on the server). Must not be null.IllegalArgumentException
- if key is nullIllegalArgumentException
- if my is nullIllegalArgumentException
- if their is nullpublic void decide(MergeDecisionType decision)
decision
- the merge decision. Must not be null.IllegalArgumentException
- if decision is nullpublic String getMyTagValue()
public String getTheirTagValue()
public MergeDecisionType getMergeDecision()
public void applyToMyPrimitive(OsmPrimitive primitive)
primitive
- the OSM primitive. Must not be null.IllegalArgumentException
- if primitive is nullIllegalStateException
- if this merge item is undecided