Enum Class Op
- All Implemented Interfaces:
Serializable,Comparable<Op>,Constable
One vocabulary, one place. Every rule in the toolkit that tests one row field against one value shares these
constants — the action-bar state rule here, and the
RowClassRule row decorator in the views module, and the views module's VisibilityRule. It lives in this module because the widgets→views
dependency does not exist, so the shared type has to sit on the side both can see.
IN/CONTAINS are collection operators (the value is a list, or the tested field is) used by
visibility rules only.
EQ/NE/IN/CONTAINS require a comparison value; PRESENT/ABSENT test only whether the
field is non-null/non-empty and therefore omit one. requiresValue() is the discriminator, and
every host is expected to reject the mismatched form rather than ignore the surplus value.
Each constant also carries its lowercase wire token, for the hosts that do serialize a rule.
- Since:
- 10.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMatches when the tested field is missing/null (no value needed).Matches when the tested field (itself a list) contains the rule's value.Matches when the tested field equals the rule value.Matches when the tested field equals one of the values in the rule's value list (the value is a list).Matches when the tested field does not equal the rule value.Matches when the tested field is non-null/non-empty (no value needed). -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanstatic OpReturns the enum constant of this class with the specified name.static Op[]values()Returns an array containing the constants of this enum class, in the order they are declared.wire()Returns the lowercase wire token for this operator.
-
Enum Constant Details
-
EQ
Matches when the tested field equals the rule value. -
NE
Matches when the tested field does not equal the rule value. -
PRESENT
Matches when the tested field is non-null/non-empty (no value needed). -
ABSENT
Matches when the tested field is missing/null (no value needed). -
IN
Matches when the tested field equals one of the values in the rule's value list (the value is a list). -
CONTAINS
Matches when the tested field (itself a list) contains the rule's value.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
wire
Returns the lowercase wire token for this operator.- Returns:
- The wire token (e.g.
"eq" ).
-
requiresValue
-
isCollectionOp
-