Enum ComparePairType
- java.lang.Object
-
- java.lang.Enum<ComparePairType>
-
- org.openstreetmap.josm.gui.conflict.pair.ComparePairType
-
- All Implemented Interfaces:
Serializable
,Comparable<ComparePairType>
public enum ComparePairType extends Enum<ComparePairType>
Enumeration of the possible comparison pairs- Since:
- 1650
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MY_WITH_MERGED
compare my version of anOsmPrimitive
with the merged versionMY_WITH_THEIR
compare my version of anOsmPrimitive
with their versionTHEIR_WITH_MERGED
compare their version of anOsmPrimitive
with the merged veresion
-
Field Summary
Fields Modifier and Type Field Description private String
displayName
the localized display nameprivate ListRole
participatingRole1
private ListRole
participatingRole2
-
Constructor Summary
Constructors Modifier Constructor Description private
ComparePairType(String displayName, ListRole participatingRole1, ListRole participatingRole2)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplayName()
replies the display nameListRole
getOppositeRole(ListRole role)
replies the opposite role ofrole
participating in this comparison pairListRole[]
getParticipatingRoles()
replies the pair ofListRole
s participating in this comparison pairboolean
isParticipatingIn(ListRole role)
replies true, ifrole
is participating in this comparison pairstatic ComparePairType
valueOf(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.
-
-
-
Enum Constant Detail
-
MY_WITH_THEIR
public static final ComparePairType MY_WITH_THEIR
compare my version of anOsmPrimitive
with their version
-
MY_WITH_MERGED
public static final ComparePairType MY_WITH_MERGED
compare my version of anOsmPrimitive
with the merged version
-
THEIR_WITH_MERGED
public static final ComparePairType THEIR_WITH_MERGED
compare their version of anOsmPrimitive
with the merged veresion
-
-
Field Detail
-
displayName
private final String displayName
the localized display name
-
participatingRole1
private final ListRole participatingRole1
-
participatingRole2
private final ListRole participatingRole2
-
-
Constructor Detail
-
ComparePairType
private ComparePairType(String displayName, ListRole participatingRole1, ListRole participatingRole2)
-
-
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(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getDisplayName
public String getDisplayName()
replies the display name- Returns:
- the display name
-
isParticipatingIn
public boolean isParticipatingIn(ListRole role)
replies true, ifrole
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 ofListRole
s participating in this comparison pair- Returns:
- the pair of list roles
-
getOppositeRole
public ListRole getOppositeRole(ListRole role)
replies the opposite role ofrole
participating in this comparison pair- Parameters:
role
- one of the two roles in this pair- Returns:
- the opposite role
- Throws:
IllegalStateException
- if role is not participating in this pair
-
-