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 |
Multipolygon.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) |
private 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 Multipolygon.MultipolygonRoleMatcher()
private void initDefaults()
private void setNormalized(Collection<String> literals, List<String> target)
private void initFromPreferences()
public void preferenceChanged(Preferences.PreferenceChangeEvent evt)
preferenceChanged
in interface Preferences.PreferenceChangedListener
public boolean isOuterRole(String role)
public boolean isInnerRole(String role)