Class TagConflictResolutionUtil.AutomaticCombine
- java.lang.Object
-
- org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.AutomaticCombine
-
- All Implemented Interfaces:
TagConflictResolutionUtil.AutomaticTagConflictResolver
- Enclosing class:
- TagConflictResolutionUtil
public static class TagConflictResolutionUtil.AutomaticCombine extends Object implements TagConflictResolutionUtil.AutomaticTagConflictResolver
Preference for automatic tag-conflict resolver by combining the tag values using a separator.- Since:
- 11606
-
-
Field Summary
Fields Modifier and Type Field Description String
description
A free descriptionboolean
isRegex
If regular expression must be used to match the Tag key or the value.String
key
The Tag key to matchString
separator
The separator to use to combine the values.String
sort
If the combined values must be sorted.
-
Constructor Summary
Constructors Constructor Description AutomaticCombine()
Default constructor.AutomaticCombine(String key, String description, boolean isRegex, String separator, String sort)
Instantiate an automatic tag-conflict resolver which combining the values using a separator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) Set<String>
instantiateSortedSet()
boolean
matchesKey(String k)
Check if this resolution apply to the given Tag key.String
resolve(Set<String> values)
Try to resolve a conflict between a set of values for a TagString
toString()
-
-
-
Field Detail
-
description
public String description
A free description
-
isRegex
public boolean isRegex
If regular expression must be used to match the Tag key or the value.
-
-
Constructor Detail
-
AutomaticCombine
public AutomaticCombine()
Default constructor.
-
AutomaticCombine
public AutomaticCombine(String key, String description, boolean isRegex, String separator, String sort)
Instantiate an automatic tag-conflict resolver which combining the values using a separator.- Parameters:
key
- The Tag key to match.description
- A free description.isRegex
- If regular expression must be used to match the Tag key or the value.separator
- The separator to use to combine the values.sort
- If the combined values must be sorted.
-
-
Method Detail
-
matchesKey
public boolean matchesKey(String k)
Description copied from interface:TagConflictResolutionUtil.AutomaticTagConflictResolver
Check if this resolution apply to the given Tag key.- Specified by:
matchesKey
in interfaceTagConflictResolutionUtil.AutomaticTagConflictResolver
- Parameters:
k
- The Tag key to match.- Returns:
- true if this automatic resolution apply to the given Tag key.
-
instantiateSortedSet
Set<String> instantiateSortedSet()
-
resolve
public String resolve(Set<String> values)
Description copied from interface:TagConflictResolutionUtil.AutomaticTagConflictResolver
Try to resolve a conflict between a set of values for a Tag- Specified by:
resolve
in interfaceTagConflictResolutionUtil.AutomaticTagConflictResolver
- Parameters:
values
- the set of conflicting values for the Tag.- Returns:
- the resolved value or null if resolution was not possible.
-
-