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 twoOsmPrimitive
s. It is represented as a pair ofOsmPrimitive
s where one element of the pair has the role my and the other has the role their.my
is theOsmPrimitive
in the local datasettheir
is theOsmPrimitive
which caused the conflict when it it was tried to merge it ontomy
.their
is usually theOsmPrimitive
from the dataset in another layer or the one retrieved from the server.
- Since:
- 1750
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isMyDeleted
private java.util.Map<PrimitiveId,PrimitiveId>
mergedMap
private T
my
private T
their
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.Map<PrimitiveId,PrimitiveId>
getMergedMap()
T
getMy()
T
getTheir()
int
hashCode()
boolean
isMatchingMy(OsmPrimitive my)
boolean
isMatchingTheir(OsmPrimitive their)
boolean
isMyDeleted()
Determines if my primitive was deleted but it has set non deleted status.boolean
isParticipating(OsmPrimitive primitive)
Replies true if the primitiveprimitive
is participating in this conflictboolean
isParticipating(PrimitiveId id)
Replies true if the primitive with idid
is participating in this conflictvoid
setMergedMap(java.util.Map<PrimitiveId,PrimitiveId> mergedMap)
java.lang.String
toString()
-
-
-
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 primitiveprimitive
is participating in this conflict- Parameters:
primitive
- the primitive- Returns:
- true if the primitive
primitive
is participating in this conflict
-
isParticipating
public boolean isParticipating(PrimitiveId id)
Replies true if the primitive with idid
is participating in this conflict- Parameters:
id
- the primitive id- Returns:
- true if the primitive
primitive
is participating in this conflict
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in 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:
toString
in classjava.lang.Object
-
-