Class Multipolygon.MultipolygonRoleMatcher
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.visitor.paint.relations.Multipolygon.MultipolygonRoleMatcher
-
- All Implemented Interfaces:
PreferenceChangedListener
- Enclosing class:
- Multipolygon
private static class Multipolygon.MultipolygonRoleMatcher extends Object implements PreferenceChangedListener
Kind of strategy object which is responsible for deciding whether a given member role indicates that the member belongs to an outer or an inner polygon.
The decision is taken based on preference settings, see the four preference keys above.
-
-
Field Summary
Fields Modifier and Type Field Description private List<String>
innerExactRoles
private List<String>
innerRolePrefixes
private List<String>
outerExactRoles
private List<String>
outerRolePrefixes
-
Constructor Summary
Constructors Modifier Constructor Description private
MultipolygonRoleMatcher()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
initDefaults()
private void
initFromPreferences()
(package private) boolean
isInnerRole(String role)
(package private) boolean
isOuterRole(String role)
void
preferenceChanged(PreferenceChangeEvent evt)
Triggered when a preference entry value changes.private static void
setNormalized(Collection<String> literals, List<String> target)
-
-
-
Field Detail
-
outerExactRoles
private final List<String> outerExactRoles
-
outerRolePrefixes
private final List<String> outerRolePrefixes
-
innerExactRoles
private final List<String> innerExactRoles
-
innerRolePrefixes
private final List<String> innerRolePrefixes
-
-
Constructor Detail
-
MultipolygonRoleMatcher
private MultipolygonRoleMatcher()
-
-
Method Detail
-
initDefaults
private void initDefaults()
-
setNormalized
private static void setNormalized(Collection<String> literals, List<String> target)
-
initFromPreferences
private void initFromPreferences()
-
preferenceChanged
public void preferenceChanged(PreferenceChangeEvent evt)
Description copied from interface:PreferenceChangedListener
Triggered when a preference entry value changes.- Specified by:
preferenceChanged
in interfacePreferenceChangedListener
- Parameters:
evt
- the preference change event
-
isOuterRole
boolean isOuterRole(String role)
-
isInnerRole
boolean isInnerRole(String role)
-
-