public static class ConditionFactory.KeyValueRegexpCondition extends ConditionFactory.KeyValueCondition
Condition.Context, Condition.ToTagConvertable| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.regex.Pattern |
pattern |
protected static java.util.Set<ConditionFactory.Op> |
SUPPORTED_OPS |
considerValAsKey, k, op, v| Constructor and Description |
|---|
KeyValueRegexpCondition(java.lang.String k,
java.lang.String v,
ConditionFactory.Op op,
boolean considerValAsKey)
Constructs a new
KeyValueRegexpCondition. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applies(Environment env)
Checks if the condition applies in the given MapCSS
Environment. |
protected boolean |
matches(Environment env) |
asTag, requiresExactKeyMatch, toStringprotected static final java.util.Set<ConditionFactory.Op> SUPPORTED_OPS
final java.util.regex.Pattern pattern
public KeyValueRegexpCondition(java.lang.String k, java.lang.String v, ConditionFactory.Op op, boolean considerValAsKey)
KeyValueRegexpCondition.k - keyv - valueop - operationconsiderValAsKey - must be falsejava.util.regex.PatternSyntaxException - if the value syntax is invalidprotected boolean matches(Environment env)
public boolean applies(Environment env)
ConditionEnvironment.applies in interface Conditionapplies in class ConditionFactory.KeyValueConditionenv - The environment to check. May not be null.true if the condition applies.