org.openstreetmap.josm.data.conflict
Class Conflict<T extends OsmPrimitive>
java.lang.Object
org.openstreetmap.josm.data.conflict.Conflict<T>
public class Conflict<T extends OsmPrimitive>
- extends java.lang.Object
Represents a conflict between two OsmPrimitive
s. It is represented as
a pair of OsmPrimitive
s where one element of the pair has the role my
and the other has the role their.
my
is the OsmPrimitive
in the local dataset
their
is the OsmPrimitive
which caused the conflict when it
it was tried to merge it onto my
. their
is usually the
OsmPrimitive
from the dataset in another layer or the one retrieved from the server.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
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
Conflict
public Conflict(T my,
T their)
Conflict
public Conflict(T my,
T their,
boolean isMyDeleted)
getMy
public T getMy()
getTheir
public T getTheir()
isMatchingMy
public boolean isMatchingMy(OsmPrimitive my)
isMatchingTheir
public boolean isMatchingTheir(OsmPrimitive their)
isParticipating
public boolean isParticipating(OsmPrimitive primitive)
- Replies true if the primitive
primitive
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 id
id
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 class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
isMyDeleted
public boolean isMyDeleted()
- 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)
JOSM