public static class Condition.KeyValueCondition extends Condition
Represents a key/value condition which is either applied to a primitive.
Condition.ClassCondition, Condition.Context, Condition.ExpressionCondition, Condition.IndexCondition, Condition.KeyCondition, Condition.KeyMatchType, Condition.KeyValueCondition, Condition.KeyValueRegexpCondition, Condition.Op, Condition.OpenEndPseudoClassCondition, Condition.PseudoClassCondition, Condition.PseudoClasses, Condition.RegexpKeyValueRegexpCondition, Condition.RoleCondition, Condition.SimpleKeyValueCondition| Modifier and Type | Field and Description |
|---|---|
boolean |
considerValAsKey
If this flag is set,
v is treated as a key and the value is the value set for that key. |
String |
k
The key to search for.
|
Condition.Op |
op
The key/value match operation.
|
String |
v
The value to search for.
|
| Constructor and Description |
|---|
KeyValueCondition(String k,
String v,
Condition.Op op,
boolean considerValAsKey)
Creates a key/value-condition.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
applies(Environment env) |
Tag |
asTag() |
String |
toString() |
createClassCondition, createExpressionCondition, createKeyCondition, createKeyValueCondition, createPseudoClassCondition, createRegexpKeyRegexpValueConditionpublic final Condition.Op op
public boolean considerValAsKey
v is treated as a key and the value is the value set for that key.public KeyValueCondition(String k, String v, Condition.Op op, boolean considerValAsKey)
Creates a key/value-condition.
k - the keyv - the valueop - the operationconsiderValAsKey - whether to consider v as another key and compare the values of key k and key v.