private static class Multipolygon.MultipolygonRoleMatcher extends Object implements Preferences.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.
Modifier and Type | Field and Description |
---|---|
private List<String> |
innerExactRoles |
private List<String> |
innerRolePrefixes |
private List<String> |
outerExactRoles |
private List<String> |
outerRolePrefixes |
Modifier | Constructor and Description |
---|---|
private |
MultipolygonRoleMatcher() |
Modifier and Type | Method and Description |
---|---|
private void |
initDefaults() |
private void |
initFromPreferences() |
boolean |
isInnerRole(String role) |
boolean |
isOuterRole(String role) |
void |
preferenceChanged(Preferences.PreferenceChangeEvent evt)
Trigerred when a preference entry value changes.
|
private static void |
setNormalized(Collection<String> literals,
List<String> target) |
private final List<String> outerExactRoles
private final List<String> outerRolePrefixes
private final List<String> innerExactRoles
private final List<String> innerRolePrefixes
private MultipolygonRoleMatcher()
private void initDefaults()
private static void setNormalized(Collection<String> literals, List<String> target)
private void initFromPreferences()
public void preferenceChanged(Preferences.PreferenceChangeEvent evt)
Preferences.PreferenceChangedListener
preferenceChanged
in interface Preferences.PreferenceChangedListener
evt
- the preference change eventpublic boolean isOuterRole(String role)
public boolean isInnerRole(String role)