public class AutoFilterRule extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
key |
private int |
minZoomLevel |
private java.util.Comparator<java.lang.String> |
valueComparator |
private java.util.function.Function<java.lang.String,java.lang.String> |
valueFormatter |
Constructor and Description |
---|
AutoFilterRule(java.lang.String key,
int minZoomLevel)
Constructs a new
AutoFilterRule . |
Modifier and Type | Method and Description |
---|---|
static AutoFilterRule[] |
defaultRules()
Returns the default list of auto filter rules.
|
java.lang.String |
getKey()
Returns the OSM key on which the rule applies.
|
int |
getMinZoomLevel()
Returns the minimum zoom level at which the rule applies.
|
java.util.Comparator<java.lang.String> |
getValueComparator()
Returns the OSM value comparator used to order the buttons.
|
java.util.function.Function<java.lang.String,java.lang.String> |
getValueFormatter()
Returns the OSM value formatter that defines the associated button label.
|
AutoFilterRule |
setValueComparator(java.util.Comparator<java.lang.String> valueComparator)
Sets the OSM value comparator used to order the buttons.
|
AutoFilterRule |
setValueFormatter(java.util.function.Function<java.lang.String,java.lang.String> valueFormatter)
Sets a OSM value formatter that defines the associated button label.
|
java.lang.String |
toString() |
private final java.lang.String key
private final int minZoomLevel
private java.util.function.Function<java.lang.String,java.lang.String> valueFormatter
private java.util.Comparator<java.lang.String> valueComparator
public AutoFilterRule(java.lang.String key, int minZoomLevel)
AutoFilterRule
.key
- the OSM key on which the rule appliesminZoomLevel
- the minimum zoom level at which the rule appliespublic java.lang.String getKey()
public int getMinZoomLevel()
public java.util.function.Function<java.lang.String,java.lang.String> getValueFormatter()
public AutoFilterRule setValueFormatter(java.util.function.Function<java.lang.String,java.lang.String> valueFormatter)
valueFormatter
- OSM value formatter. Cannot be nullthis
java.lang.NullPointerException
- if valueFormatter
is nullpublic java.util.Comparator<java.lang.String> getValueComparator()
public AutoFilterRule setValueComparator(java.util.Comparator<java.lang.String> valueComparator)
valueComparator
- the OSM value comparatorthis
java.lang.NullPointerException
- if valueComparator
is nullpublic static AutoFilterRule[] defaultRules()
public java.lang.String toString()
toString
in class java.lang.Object