Class ConditionFactory.RegexpKeyValueRegexpCondition
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueCondition
-
- org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueRegexpCondition
-
- org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.RegexpKeyValueRegexpCondition
-
- All Implemented Interfaces:
Condition
,Condition.TagCondition
- Enclosing class:
- ConditionFactory
public static class ConditionFactory.RegexpKeyValueRegexpCondition extends ConditionFactory.KeyValueRegexpCondition
A condition that checks that a key with the matching pattern has a value with the matching pattern.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.mappaint.mapcss.Condition
Condition.Context, Condition.TagCondition
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.regex.Pattern
keyPattern
-
Fields inherited from class org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueRegexpCondition
pattern, SUPPORTED_OPS
-
Fields inherited from class org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueCondition
considerValAsKey, k, op, v
-
-
Constructor Summary
Constructors Constructor Description RegexpKeyValueRegexpCondition(java.lang.String k, java.lang.String v, ConditionFactory.Op op)
Create a condition in which the key and the value need to match a given regexp
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
matches(Tagged osm)
boolean
requiresExactKeyMatch()
Determines if this condition requires an exact key match.-
Methods inherited from class org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueRegexpCondition
applies
-
Methods inherited from class org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueCondition
asTag, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.gui.mappaint.mapcss.Condition.TagCondition
applies
-
-
-
-
Field Detail
-
keyPattern
final java.util.regex.Pattern keyPattern
-
-
Constructor Detail
-
RegexpKeyValueRegexpCondition
public RegexpKeyValueRegexpCondition(java.lang.String k, java.lang.String v, ConditionFactory.Op op)
Create a condition in which the key and the value need to match a given regexp- Parameters:
k
- The key regexpv
- The value regexpop
- The operation to use when comparing the key and the value.
-
-
Method Detail
-
requiresExactKeyMatch
public boolean requiresExactKeyMatch()
Description copied from class:ConditionFactory.KeyValueCondition
Determines if this condition requires an exact key match.- Overrides:
requiresExactKeyMatch
in classConditionFactory.KeyValueCondition
- Returns:
true
if this condition requires an exact key match.
-
matches
protected boolean matches(Tagged osm)
- Overrides:
matches
in classConditionFactory.KeyValueRegexpCondition
-
-