org.openstreetmap.josm.data.conflict
Class Conflict<T extends OsmPrimitive>

java.lang.Object
  extended by org.openstreetmap.josm.data.conflict.Conflict<T>

public class Conflict<T extends OsmPrimitive>
extends java.lang.Object

Represents a conflict between two OsmPrimitives. It is represented as a pair of OsmPrimitives where one element of the pair has the role my and the other has the role their.


Field Summary
private  boolean isMyDeleted
           
private  java.util.Map<PrimitiveId,PrimitiveId> mergedMap
           
private  T my
           
private  T their
           
 
Constructor Summary
Conflict(T my, T their)
           
Conflict(T my, T their, boolean isMyDeleted)
           
 
Method Summary
 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()
           
 boolean isParticipating(OsmPrimitive primitive)
          Replies true if the primitive primitive is participating in this conflict
 boolean isParticipating(PrimitiveId id)
          Replies true if the primitive with id id is participating in this conflict
 void setMergedMap(java.util.Map<PrimitiveId,PrimitiveId> mergedMap)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

Conflict

public Conflict(T my,
                T their)

Conflict

public Conflict(T my,
                T their,
                boolean isMyDeleted)
Method Detail

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