org.openstreetmap.josm.gui.conflict.pair
Enum ComparePairType

java.lang.Object
  extended by java.lang.Enum<ComparePairType>
      extended by org.openstreetmap.josm.gui.conflict.pair.ComparePairType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ComparePairType>

public enum ComparePairType
extends java.lang.Enum<ComparePairType>

Enumeration of the possible comparison pairs


Enum Constant Summary
MY_WITH_MERGED
          compare my version of an OsmPrimitive with the merged version
MY_WITH_THEIR
          compare my version of an OsmPrimitive with their version
THEIR_WITH_MERGED
          compare their version of an OsmPrimitive with the merged veresion
 
Field Summary
private  java.lang.String displayName
          the localized display name
private  ListRole[] participatingRoles
           
 
Method Summary
 java.lang.String getDisplayName()
          replies the display name
 ListRole getOppositeRole(ListRole role)
          replies the opposite role of role participating in this comparison pair
 ListRole[] getParticipatingRoles()
          replies the pair of ListRoles participating in this comparison pair
 boolean isParticipatingIn(ListRole role)
          replies true, if role is participating in this comparison pair
static ComparePairType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ComparePairType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MY_WITH_THEIR

public static final ComparePairType MY_WITH_THEIR
compare my version of an OsmPrimitive with their version


MY_WITH_MERGED

public static final ComparePairType MY_WITH_MERGED
compare my version of an OsmPrimitive with the merged version


THEIR_WITH_MERGED

public static final ComparePairType THEIR_WITH_MERGED
compare their version of an OsmPrimitive with the merged veresion

Field Detail

displayName

private final java.lang.String displayName
the localized display name


participatingRoles

private ListRole[] participatingRoles
Method Detail

values

public static ComparePairType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ComparePairType c : ComparePairType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ComparePairType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getDisplayName

public java.lang.String getDisplayName()
replies the display name

Returns:
the display name

isParticipatingIn

public boolean isParticipatingIn(ListRole role)
replies true, if role is participating in this comparison pair

Parameters:
role - the list role
Returns:
true, if role is participating in this comparison pair; false, otherwise

getParticipatingRoles

public ListRole[] getParticipatingRoles()
replies the pair of ListRoles participating in this comparison pair

Returns:
the pair of list roles

getOppositeRole

public ListRole getOppositeRole(ListRole role)
replies the opposite role of role participating in this comparison pair

Parameters:
role - one of the two roles in this pair
Returns:
the opposite role
Throws:
java.lang.IllegalStateException - if role is not participating in this pair


JOSM