Class Conflict<T extends OsmPrimitive>
- java.lang.Object
-
- org.openstreetmap.josm.data.conflict.Conflict<T>
-
- Type Parameters:
T- primitive type of the conflict
public class Conflict<T extends OsmPrimitive> extends java.lang.Object
Represents a conflict between twoOsmPrimitives. It is represented as a pair ofOsmPrimitives where one element of the pair has the role my and the other has the role their.myis theOsmPrimitivein the local datasettheiris theOsmPrimitivewhich caused the conflict when it it was tried to merge it ontomy.theiris usually theOsmPrimitivefrom the dataset in another layer or the one retrieved from the server.
- Since:
- 1750
-
-
Field Summary
Fields Modifier and Type Field Description private booleanisMyDeletedprivate java.util.Map<PrimitiveId,PrimitiveId>mergedMapprivate Tmyprivate Ttheir
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.Map<PrimitiveId,PrimitiveId>getMergedMap()TgetMy()TgetTheir()inthashCode()booleanisMatchingMy(OsmPrimitive my)booleanisMatchingTheir(OsmPrimitive their)booleanisMyDeleted()Determines if my primitive was deleted but it has set non deleted status.booleanisParticipating(OsmPrimitive primitive)Replies true if the primitiveprimitiveis participating in this conflictbooleanisParticipating(PrimitiveId id)Replies true if the primitive with ididis participating in this conflictvoidsetMergedMap(java.util.Map<PrimitiveId,PrimitiveId> mergedMap)java.lang.StringtoString()
-
-
-
Field Detail
-
my
private final T extends OsmPrimitive my
-
their
private final T extends OsmPrimitive their
-
isMyDeleted
private final boolean isMyDeleted
-
mergedMap
private java.util.Map<PrimitiveId,PrimitiveId> mergedMap
-
-
Method Detail
-
isMatchingMy
public boolean isMatchingMy(OsmPrimitive my)
-
isMatchingTheir
public boolean isMatchingTheir(OsmPrimitive their)
-
isParticipating
public boolean isParticipating(OsmPrimitive primitive)
Replies true if the primitiveprimitiveis participating in this conflict- Parameters:
primitive- the primitive- Returns:
- true if the primitive
primitiveis participating in this conflict
-
isParticipating
public boolean isParticipating(PrimitiveId id)
Replies true if the primitive with ididis participating in this conflict- Parameters:
id- the primitive id- Returns:
- true if the primitive
primitiveis participating in this conflict
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
isMyDeleted
public boolean isMyDeleted()
Determines if my primitive was deleted but it has set non deleted status.- Returns:
- True if my primitive was deleted but it has set non deleted status because it's referred by another primitive and references to deleted primitives are not allowed.
-
getMergedMap
public final java.util.Map<PrimitiveId,PrimitiveId> getMergedMap()
-
setMergedMap
public final void setMergedMap(java.util.Map<PrimitiveId,PrimitiveId> mergedMap)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-