Class ConditionFactory.KeyValueRegexpCondition
java.lang.Object
org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueCondition
org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueRegexpCondition
- All Implemented Interfaces:
Condition,Condition.TagCondition
- Direct Known Subclasses:
ConditionFactory.RegexpKeyValueRegexpCondition
- Enclosing class:
- ConditionFactory
public static class ConditionFactory.KeyValueRegexpCondition
extends ConditionFactory.KeyValueCondition
This condition requires a fixed key to match a given regexp
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.mappaint.mapcss.Condition
Condition.Context, Condition.TagCondition -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Patternprotected static final Set<ConditionFactory.Op>Fields inherited from class org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueCondition
considerValAsKey, k, op, v -
Constructor Summary
ConstructorsConstructorDescriptionKeyValueRegexpCondition(String k, String v, ConditionFactory.Op op, boolean considerValAsKey) Constructs a newKeyValueRegexpCondition. -
Method Summary
Methods inherited from class org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyValueCondition
asTag, requiresExactKeyMatch, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.gui.mappaint.mapcss.Condition.TagCondition
applies
-
Field Details
-
SUPPORTED_OPS
-
pattern
-
-
Constructor Details
-
KeyValueRegexpCondition
public KeyValueRegexpCondition(String k, String v, ConditionFactory.Op op, boolean considerValAsKey) Constructs a newKeyValueRegexpCondition.- Parameters:
k- keyv- valueop- operationconsiderValAsKey- must be false- Throws:
PatternSyntaxException- if the value syntax is invalid
-
-
Method Details
-
matches
-
applies
Description copied from interface:ConditionChecks if the condition applies in the givenTaggedelement.- Specified by:
appliesin interfaceCondition- Specified by:
appliesin interfaceCondition.TagCondition- Overrides:
appliesin classConditionFactory.KeyValueCondition- Parameters:
osm- The tagged to check.- Returns:
trueif the condition applies.
-